diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-05-30 17:18:41 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-05-30 17:18:41 +0300 |
commit | d548e9bc6c987a4834ce3d65b33108f55e0f7a2c (patch) | |
tree | 97b58a414c6b8c910afb54bfacfc303e926f849d /src/gui/socialwindow.cpp | |
parent | a5406f20dba001d4491eb90296c181857c37eabf (diff) | |
download | manaplus-d548e9bc6c987a4834ce3d65b33108f55e0f7a2c.tar.gz manaplus-d548e9bc6c987a4834ce3d65b33108f55e0f7a2c.tar.bz2 manaplus-d548e9bc6c987a4834ce3d65b33108f55e0f7a2c.tar.xz manaplus-d548e9bc6c987a4834ce3d65b33108f55e0f7a2c.zip |
Fix memory leaks in being, socialwindow classes.
Diffstat (limited to 'src/gui/socialwindow.cpp')
-rw-r--r-- | src/gui/socialwindow.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp index 0be9dd70f..d87b94bad 100644 --- a/src/gui/socialwindow.cpp +++ b/src/gui/socialwindow.cpp @@ -470,9 +470,14 @@ public: } if (!finded) + { + delete *ai; avatars->erase(ai); + } else + { ++ai; + } } std::vector<std::string>::iterator i = names.begin(); @@ -745,6 +750,7 @@ public: if (ava && ava->getX() == x && ava->getY() == y) { + delete ava; avatars->erase(i); return; } |