Skip to content

Commit

Permalink
GUI: Fix small memory leak in grid based load chooser.
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Schickel committed Jul 1, 2012
1 parent 3256081 commit 049e61b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gui/saveload-dialog.cpp
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions gui/saveload-dialog.h
Expand Up @@ -112,6 +112,7 @@ class SaveLoadChooserSimple : public SaveLoadChooserDialog {
class LoadChooserThumbnailed : public SaveLoadChooserDialog {
public:
LoadChooserThumbnailed(const Common::String &title);
~LoadChooserThumbnailed();

virtual const Common::String &getResultString() const;

Expand Down

0 comments on commit 049e61b

Please sign in to comment.