[Scummvm-git-logs] scummvm master -> 42838612d2a8daa4b9a7819f420d3c165b29bdba

criezy noreply at scummvm.org
Mon Mar 27 00:02:07 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:
42838612d2 AGS: Fix double-free of room cameras surfaces


Commit: 42838612d2a8daa4b9a7819f420d3c165b29bdba
    https://github.com/scummvm/scummvm/commit/42838612d2a8daa4b9a7819f420d3c165b29bdba
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2023-03-27T01:01:55+01:00

Commit Message:
AGS: Fix double-free of room cameras surfaces

This fixes a crash in Dreams in a Witch House (bug #14338)

Changed paths:
    engines/ags/engine/gfx/ali_3d_scummvm.cpp


diff --git a/engines/ags/engine/gfx/ali_3d_scummvm.cpp b/engines/ags/engine/gfx/ali_3d_scummvm.cpp
index c4f2f6a5454..738d1cb2161 100644
--- a/engines/ags/engine/gfx/ali_3d_scummvm.cpp
+++ b/engines/ags/engine/gfx/ali_3d_scummvm.cpp
@@ -275,7 +275,7 @@ void ScummVMRendererGraphicsDriver::InitSpriteBatch(size_t index, const SpriteBa
 	const int src_h = desc.Viewport.GetHeight() / desc.Transform.ScaleY;
 	// Surface was prepared externally (common for room cameras)
 	if (desc.Surface != nullptr) {
-		batch.Surface = std::static_pointer_cast<Bitmap>(desc.Surface);
+		batch.Surface = desc.Surface;
 		batch.Opaque = true;
 		batch.IsVirtualScreen = false;
 	}




More information about the Scummvm-git-logs mailing list