aboutsummaryrefslogtreecommitdiff
path: root/engines/cge
diff options
context:
space:
mode:
authorPaul Gilbert2011-08-06 16:08:47 +1000
committerPaul Gilbert2011-08-06 16:08:47 +1000
commitfc05b8cf1b489933d28e35d949f2de62cc0d8c6a (patch)
tree400bd828bbd3743dcafa48147cae0cb684cf47e8 /engines/cge
parentc961597988ab0e9d9ed7dff5b317d620bcc84153 (diff)
downloadscummvm-rg350-fc05b8cf1b489933d28e35d949f2de62cc0d8c6a.tar.gz
scummvm-rg350-fc05b8cf1b489933d28e35d949f2de62cc0d8c6a.tar.bz2
scummvm-rg350-fc05b8cf1b489933d28e35d949f2de62cc0d8c6a.zip
CGE: Fix memory leak with savegame thumbnails
Diffstat (limited to 'engines/cge')
-rw-r--r--engines/cge/cge_main.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp
index 41bb68417c..3d1c451862 100644
--- a/engines/cge/cge_main.cpp
+++ b/engines/cge/cge_main.cpp
@@ -293,6 +293,7 @@ void CGEEngine::writeSavegameHeader(Common::OutSaveFile *out, SavegameHeader &he
Graphics::Surface *s = _vga->_page[0];
::createThumbnail(thumb, (const byte *)s->pixels, kScrWidth, kScrHeight, thumbPalette);
Graphics::saveThumbnail(*out, *thumb);
+ thumb->free();
delete thumb;
// Write out the save date/time