diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-06-05 04:45:51 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-06-05 04:45:51 +0300 |
commit | 93aa9c81a2043c6caecd8437bfecbfa0c9b79436 (patch) | |
tree | 3438b31a08a3d5ec673f439c1cbc8fd7bd5ae59a /src/gui/socialwindow.cpp | |
parent | 6d06bec226e4d6966e62612b41baf336955b23f4 (diff) | |
download | mv-93aa9c81a2043c6caecd8437bfecbfa0c9b79436.tar.gz mv-93aa9c81a2043c6caecd8437bfecbfa0c9b79436.tar.bz2 mv-93aa9c81a2043c6caecd8437bfecbfa0c9b79436.tar.xz mv-93aa9c81a2043c6caecd8437bfecbfa0c9b79436.zip |
Fix memory leak in equipmentwindow and socialwindow.
Diffstat (limited to 'src/gui/socialwindow.cpp')
-rw-r--r-- | src/gui/socialwindow.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp index 7b8d064ce..de9bab42b 100644 --- a/src/gui/socialwindow.cpp +++ b/src/gui/socialwindow.cpp @@ -558,6 +558,14 @@ public: std::list<MapItem*>::iterator i = portals.begin(); SpecialLayer *specialLayer = map->getSpecialLayer(); + std::vector<Avatar*>::iterator ia = avatars->begin(); + + while (ia != avatars->end()) + { + delete *ia; + ++ ia; + } + avatars->clear(); int idx = 0; |