From 636508e8544600b4aa10c35e621043ed26a1b8c1 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 14 Oct 2012 22:17:17 +0300 Subject: Fix memory corruption from previous commit with labels. --- src/gui/widgets/label.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/gui/widgets') 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 -- cgit v1.2.3-70-g09d2