summaryrefslogtreecommitdiff
path: root/src/actormanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-24 21:07:24 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-24 21:07:24 +0300
commitdaa6841b2d2d2d4de530ffe01123fa62c1336e73 (patch)
treee5172392252851c54b11ae50d7480aca5e270cb7 /src/actormanager.cpp
parent34c821abdad0af3064d7e3ee9585bbbb35953a15 (diff)
downloadplus-daa6841b2d2d2d4de530ffe01123fa62c1336e73.tar.gz
plus-daa6841b2d2d2d4de530ffe01123fa62c1336e73.tar.bz2
plus-daa6841b2d2d2d4de530ffe01123fa62c1336e73.tar.xz
plus-daa6841b2d2d2d4de530ffe01123fa62c1336e73.zip
fix possible pets leak.
Diffstat (limited to 'src/actormanager.cpp')
-rw-r--r--src/actormanager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index d7a272284..e28f999fd 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -792,8 +792,9 @@ void ActorManager::logic()
FOR_EACH (ActorSpritesConstIterator, it, mDeleteActors)
{
- mActors.erase(*it);
- delete *it;
+ ActorSprite *actor = *it;
+ mActors.erase(actor);
+ delete actor;
}
mDeleteActors.clear();