summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-14 22:17:17 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-14 22:17:17 +0300
commit636508e8544600b4aa10c35e621043ed26a1b8c1 (patch)
treeb7ff2ce2ba8a63be6b9920f73cffc7527e736801 /src/gui
parentb06e6916d0bbd33d81b4a957b6362f7a0f8ea083 (diff)
downloadplus-636508e8544600b4aa10c35e621043ed26a1b8c1.tar.gz
plus-636508e8544600b4aa10c35e621043ed26a1b8c1.tar.bz2
plus-636508e8544600b4aa10c35e621043ed26a1b8c1.tar.xz
plus-636508e8544600b4aa10c35e621043ed26a1b8c1.zip
Fix memory corruption from previous commit with labels.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/label.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/widgets/label.cpp b/src/gui/widgets/label.cpp
index 188da1bf4..4544510a2 100644
--- a/src/gui/widgets/label.cpp
+++ b/src/gui/widgets/label.cpp
@@ -48,9 +48,7 @@ Label::~Label()
{
mInstances --;
if (mInstances == 0 && Theme::instance())
- {
Theme::instance()->unload(mSkin);
- }
}
void Label::init()
@@ -60,8 +58,9 @@ void Label::init()
{
if (Theme::instance())
mSkin = Theme::instance()->load("label.xml", "");
- mInstances ++;
}
+ mInstances ++;
+
if (mSkin)
mPadding = mSkin->getPadding();
else