aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/saveload-dialog.cpp5
-rw-r--r--gui/saveload-dialog.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index 3d542b1dc8..d7fa9c686a 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -502,6 +502,11 @@ LoadChooserThumbnailed::LoadChooserThumbnailed(const Common::String &title)
_pageDisplay->setAlign(Graphics::kTextAlignRight);
}
+LoadChooserThumbnailed::~LoadChooserThumbnailed() {
+ removeWidget(_pageDisplay);
+ delete _pageDisplay;
+}
+
const Common::String &LoadChooserThumbnailed::getResultString() const {
// FIXME: This chooser is only for loading, thus the result is never used
// anyway. But this is still an ugly hack.
diff --git a/gui/saveload-dialog.h b/gui/saveload-dialog.h
index 63dbf4182e..e169dbf613 100644
--- a/gui/saveload-dialog.h
+++ b/gui/saveload-dialog.h
@@ -112,6 +112,7 @@ private:
class LoadChooserThumbnailed : public SaveLoadChooserDialog {
public:
LoadChooserThumbnailed(const Common::String &title);
+ ~LoadChooserThumbnailed();
virtual const Common::String &getResultString() const;