[Scummvm-git-logs] scummvm master -> c133fec9ebe60bfd44ff934f1e43adb112a34fad
neuromancer
neuromancer at users.noreply.github.com
Thu Mar 11 01:16:26 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c133fec9eb PRIVATE: fixed memory leak on vs picture scaling
Commit: c133fec9ebe60bfd44ff934f1e43adb112a34fad
https://github.com/scummvm/scummvm/commit/c133fec9ebe60bfd44ff934f1e43adb112a34fad
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2021-03-10T22:16:10-03:00
Commit Message:
PRIVATE: fixed memory leak on vs picture scaling
Changed paths:
engines/private/metaengine.cpp
diff --git a/engines/private/metaengine.cpp b/engines/private/metaengine.cpp
index 1337b6e95a..a7547c6fdb 100644
--- a/engines/private/metaengine.cpp
+++ b/engines/private/metaengine.cpp
@@ -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;
More information about the Scummvm-git-logs
mailing list