summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-01-07 14:51:29 +0300
committerAndrei Karas <akaras@inbox.ru>2014-01-07 14:51:29 +0300
commit5ea427865209cc2b976fc84aadcd257b35e6bd79 (patch)
treeb7ed0944a9185b17252d986a88ae5e241b566337
parent09428bc03221484d27fe102ed436c08f6a09d866 (diff)
downloadmanaplus-5ea427865209cc2b976fc84aadcd257b35e6bd79.tar.gz
manaplus-5ea427865209cc2b976fc84aadcd257b35e6bd79.tar.bz2
manaplus-5ea427865209cc2b976fc84aadcd257b35e6bd79.tar.xz
manaplus-5ea427865209cc2b976fc84aadcd257b35e6bd79.zip
fix leak in atatardb with duplicate avatars.
-rw-r--r--src/resources/db/avatardb.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resources/db/avatardb.cpp b/src/resources/db/avatardb.cpp
index 1df47e3ef..b522c6b76 100644
--- a/src/resources/db/avatardb.cpp
+++ b/src/resources/db/avatardb.cpp
@@ -79,7 +79,7 @@ void AvatarDB::loadXmlFile(const std::string &fileName)
BeingInfo *currentInfo = nullptr;
if (mAvatarInfos.find(id) != mAvatarInfos.end())
currentInfo = mAvatarInfos[id];
- else
+ if (!currentInfo)
currentInfo = new BeingInfo;
currentInfo->setName(XML::langProperty(