[Scummvm-git-logs] scummvm master -> 8eff55d7a0e317bd84362e9f3ada29e9af3c4564

elasota noreply at scummvm.org
Sun Jun 11 20:51:40 UTC 2023


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:
8eff55d7a0 VCRUISE: Fix loadGraphic memory leak


Commit: 8eff55d7a0e317bd84362e9f3ada29e9af3c4564
    https://github.com/scummvm/scummvm/commit/8eff55d7a0e317bd84362e9f3ada29e9af3c4564
Author: elasota (ejlasota at gmail.com)
Date: 2023-06-11T16:51:09-04:00

Commit Message:
VCRUISE: Fix loadGraphic memory leak

Changed paths:
    engines/vcruise/runtime.cpp


diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index e71fbc6faaa..0b520009b39 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -4736,10 +4736,9 @@ Common::SharedPtr<Graphics::Surface> Runtime::loadGraphic(const Common::String &
 		return nullptr;
 	}
 
-	Common::SharedPtr<Graphics::Surface> surf(new Graphics::Surface());
+	Common::SharedPtr<Graphics::Surface> surf(new Graphics::Surface(), Graphics::SurfaceDeleter());
 	surf->copyFrom(*bmpDecoder.getSurface());
-	surf.reset(surf->convertTo(Graphics::createPixelFormat<8888>()));
-
+	surf = Common::SharedPtr<Graphics::Surface>(surf->convertTo(Graphics::createPixelFormat<8888>()), Graphics::SurfaceDeleter());
 	return surf;
 }
 




More information about the Scummvm-git-logs mailing list