summaryrefslogtreecommitdiff
path: root/src/gui/widgets/extendednamesmodel.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-29 17:31:17 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-29 17:45:48 +0300
commita57d736348be038bcc1371b05dbc89459f87d045 (patch)
tree17b07752ede14f4e3ac2ef1a3d11284a0bbcaddf /src/gui/widgets/extendednamesmodel.cpp
parent9234bf25b145995d5395f98a1f5dd030783d25d6 (diff)
downloadManaVerse-a57d736348be038bcc1371b05dbc89459f87d045.tar.gz
ManaVerse-a57d736348be038bcc1371b05dbc89459f87d045.tar.bz2
ManaVerse-a57d736348be038bcc1371b05dbc89459f87d045.tar.xz
ManaVerse-a57d736348be038bcc1371b05dbc89459f87d045.zip
Add icons to quests window.
Fix memory leak in extendednamesmodel.
Diffstat (limited to 'src/gui/widgets/extendednamesmodel.cpp')
-rw-r--r--src/gui/widgets/extendednamesmodel.cpp4
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();
}