diff options
Diffstat (limited to 'src/gui/widgets/extendednamesmodel.cpp')
-rw-r--r-- | src/gui/widgets/extendednamesmodel.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/widgets/extendednamesmodel.cpp b/src/gui/widgets/extendednamesmodel.cpp index 1cc6561dc..11c594321 100644 --- a/src/gui/widgets/extendednamesmodel.cpp +++ b/src/gui/widgets/extendednamesmodel.cpp @@ -65,6 +65,8 @@ void ExtendedNamesModel::clear() for (std::vector<Image*>::iterator it = mImages.begin(), it_end = mImages.end(); it != it_end; ++ it) { - (*it)->decRef(); + if (*it) + (*it)->decRef(); } + mImages.clear(); } |