summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-30 21:05:26 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-30 21:05:26 +0300
commit3e22726df1aecf9db96b558c9e7597166d685ad2 (patch)
tree66bb296bc21f7d01053187adc193c6224ca959b7
parentbcdc03e42f9a73b187a73f58bd0c59e8279969f2 (diff)
downloadmv-3e22726df1aecf9db96b558c9e7597166d685ad2.tar.gz
mv-3e22726df1aecf9db96b558c9e7597166d685ad2.tar.bz2
mv-3e22726df1aecf9db96b558c9e7597166d685ad2.tar.xz
mv-3e22726df1aecf9db96b558c9e7597166d685ad2.zip
Fix leak in item class.
-rw-r--r--src/item.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/item.cpp b/src/item.cpp
index d484f64cb..1311a7354 100644
--- a/src/item.cpp
+++ b/src/item.cpp
@@ -54,6 +54,11 @@ Item::~Item()
mImage->decRef();
mImage = nullptr;
}
+ if (mDrawImage)
+ {
+ mDrawImage->decRef();
+ mDrawImage = nullptr;
+ }
}
void Item::setId(int id, unsigned char color)