diff options
-rw-r--r-- | gui/ThemeData.cpp | 9 | ||||
-rw-r--r-- | gui/ThemeData.h | 9 |
2 files changed, 10 insertions, 8 deletions
diff --git a/gui/ThemeData.cpp b/gui/ThemeData.cpp index fbe5bb701d..48a922e600 100644 --- a/gui/ThemeData.cpp +++ b/gui/ThemeData.cpp @@ -133,4 +133,13 @@ void ThemeItemBitmap::drawSelf(bool draw, bool restore) { _engine->addDirtyRect(_area); } +WidgetDrawData::~WidgetDrawData() { + _steps.clear(); + + if (_surfaceCache) { + _surfaceCache->free(); + delete _surfaceCache; + } +} + } diff --git a/gui/ThemeData.h b/gui/ThemeData.h index 699c5ae6ce..a1f27e1c9b 100644 --- a/gui/ThemeData.h +++ b/gui/ThemeData.h @@ -58,14 +58,7 @@ struct WidgetDrawData { /** Texture where the cached widget is stored. */ Graphics::Surface *_surfaceCache; - ~WidgetDrawData() { - _steps.clear(); - - if (_surfaceCache) { - _surfaceCache->free(); - delete _surfaceCache; - } - } + ~WidgetDrawData(); }; class ThemeItem { |