From e668574d88da1a0a93a0eee810e816eb2bc4a88b Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 5 Jan 2009 19:54:10 +0000 Subject: Tweak gui/ThemeData.* to not produce errors on certain system like Haiku (at least I hope this will work :) svn-id: r35743 --- gui/ThemeData.cpp | 9 +++++++++ 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 { -- cgit v1.2.3