PRIVATE: fixed memory leak on vs picture scaling

This commit is contained in:
neuromancer 2021-03-10 22:16:10 -03:00
parent 5e09d76e4b
commit c133fec9eb

View file

@ -42,7 +42,11 @@ Common::Error PrivateMetaEngine::createInstance(OSystem *syst, Engine **engine,
void PrivateMetaEngine::getSavegameThumbnail(Graphics::Surface &thumb) {
Graphics::Surface *vs = Private::g_private->decodeImage(Private::g_private->_nextVS);
thumb = *vs->scale(kThumbnailWidth, kThumbnailHeight2);
Graphics::Surface *svs = vs->scale(kThumbnailWidth, kThumbnailHeight2);
thumb.copyFrom(*svs);
svs->free();
delete svs;
vs->free();
delete vs;