From 14a9a1da30ca772efd42a9ce6662a11b102818bc Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 12 Jul 2012 11:01:25 +0300 Subject: Fix leaks after last commit. --- src/gui/widgets/textfield.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gui/widgets/textfield.cpp') diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp index 4b71bd795..8f543e3bf 100644 --- a/src/gui/widgets/textfield.cpp +++ b/src/gui/widgets/textfield.cpp @@ -83,6 +83,8 @@ TextField::TextField(const std::string &text, bool loseFocusOnTab, TextField::~TextField() { instances--; + if (instances == 0 && Theme::instance()) + Theme::instance()->unloadRect(skin); } void TextField::updateAlpha() -- cgit v1.2.3-70-g09d2