GUI: Fix small memory leak in grid based load chooser.

This commit is contained in:
Johannes Schickel 2012-07-01 17:17:04 +02:00
parent 3256081b2b
commit 049e61b445
2 changed files with 6 additions and 0 deletions

View File

@ -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.

View File

@ -112,6 +112,7 @@ private:
class LoadChooserThumbnailed : public SaveLoadChooserDialog {
public:
LoadChooserThumbnailed(const Common::String &title);
~LoadChooserThumbnailed();
virtual const Common::String &getResultString() const;