summaryrefslogtreecommitdiff
path: root/src/gui/socialwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-06-05 04:45:51 +0300
committerAndrei Karas <akaras@inbox.ru>2011-06-05 04:45:51 +0300
commit93aa9c81a2043c6caecd8437bfecbfa0c9b79436 (patch)
tree3438b31a08a3d5ec673f439c1cbc8fd7bd5ae59a /src/gui/socialwindow.cpp
parent6d06bec226e4d6966e62612b41baf336955b23f4 (diff)
downloadplus-93aa9c81a2043c6caecd8437bfecbfa0c9b79436.tar.gz
plus-93aa9c81a2043c6caecd8437bfecbfa0c9b79436.tar.bz2
plus-93aa9c81a2043c6caecd8437bfecbfa0c9b79436.tar.xz
plus-93aa9c81a2043c6caecd8437bfecbfa0c9b79436.zip
Fix memory leak in equipmentwindow and socialwindow.
Diffstat (limited to 'src/gui/socialwindow.cpp')
-rw-r--r--src/gui/socialwindow.cpp8
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;