diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-14 22:17:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-14 22:17:17 +0300 |
commit | 636508e8544600b4aa10c35e621043ed26a1b8c1 (patch) | |
tree | b7ff2ce2ba8a63be6b9920f73cffc7527e736801 | |
parent | b06e6916d0bbd33d81b4a957b6362f7a0f8ea083 (diff) | |
download | mv-636508e8544600b4aa10c35e621043ed26a1b8c1.tar.gz mv-636508e8544600b4aa10c35e621043ed26a1b8c1.tar.bz2 mv-636508e8544600b4aa10c35e621043ed26a1b8c1.tar.xz mv-636508e8544600b4aa10c35e621043ed26a1b8c1.zip |
Fix memory corruption from previous commit with labels.
-rw-r--r-- | src/gui/widgets/label.cpp | 5 |
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 |