summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/socialwindow.cpp6
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;
}