summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-02 01:39:17 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-02 01:39:17 +0300
commitb3b35f70d35160047711b394212e78bda5f3bce0 (patch)
treeeeef0b7a75c81e52aec16b789fb3b785538785d3
parentc01aec243610016c2cd5e4211fee484627bc69ea (diff)
downloadmanaplus-b3b35f70d35160047711b394212e78bda5f3bce0.tar.gz
manaplus-b3b35f70d35160047711b394212e78bda5f3bce0.tar.bz2
manaplus-b3b35f70d35160047711b394212e78bda5f3bce0.tar.xz
manaplus-b3b35f70d35160047711b394212e78bda5f3bce0.zip
Fix leak in actorsprite.
-rw-r--r--src/actorsprite.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/actorsprite.cpp b/src/actorsprite.cpp
index b78f6bb91..e5d0cd288 100644
--- a/src/actorsprite.cpp
+++ b/src/actorsprite.cpp
@@ -368,6 +368,8 @@ void ActorSprite::setupSpriteDisplay(const SpriteDisplay &display,
img = Theme::getImageFromTheme("unknown-item.png");
addSprite(new ImageSprite(img));
+ if (img)
+ img->decRef();
}
}