From 3e22726df1aecf9db96b558c9e7597166d685ad2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 30 Jun 2012 21:05:26 +0300 Subject: Fix leak in item class. --- src/item.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/item.cpp') 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) -- cgit v1.2.3-70-g09d2