summaryrefslogtreecommitdiff
path: root/src/gui/widgets/icon.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-12 02:11:25 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-12 02:11:25 +0300
commit4ddde5f4fa3f4b77c2ddf1d4848d06628d396842 (patch)
tree8653a426a81a23fccfdeea45c042d59a13691bbf /src/gui/widgets/icon.cpp
parent9ce9d5563195bf9d7d22356252f38bc95b247527 (diff)
downloadmv-4ddde5f4fa3f4b77c2ddf1d4848d06628d396842.tar.gz
mv-4ddde5f4fa3f4b77c2ddf1d4848d06628d396842.tar.bz2
mv-4ddde5f4fa3f4b77c2ddf1d4848d06628d396842.tar.xz
mv-4ddde5f4fa3f4b77c2ddf1d4848d06628d396842.zip
fix random rare crashes in npc and possible other windows.
Diffstat (limited to 'src/gui/widgets/icon.cpp')
-rw-r--r--src/gui/widgets/icon.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/widgets/icon.cpp b/src/gui/widgets/icon.cpp
index 8937e202a..61b2611cf 100644
--- a/src/gui/widgets/icon.cpp
+++ b/src/gui/widgets/icon.cpp
@@ -45,6 +45,12 @@ Icon::Icon(const Widget2 *const widget, Image *const image) :
setSize(mImage->mBounds.w, mImage->mBounds.h);
}
+Icon::~Icon()
+{
+ if (gui)
+ gui->removeDragged(this);
+}
+
void Icon::setImage(Image *const image)
{
mImage = image;