[Scummvm-git-logs] scummvm branch-2-9 -> 2402a834551b082d7e1ae480c6571fc2341f4f33

mduggan noreply at scummvm.org
Sat Nov 23 00:11:14 UTC 2024


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:
2402a83455 DGDS: Avoid potential use of deallocated memory


Commit: 2402a834551b082d7e1ae480c6571fc2341f4f33
    https://github.com/scummvm/scummvm/commit/2402a834551b082d7e1ae480c6571fc2341f4f33
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2024-11-23T11:08:44+11:00

Commit Message:
DGDS: Avoid potential use of deallocated memory

Changed paths:
    engines/dgds/scene.cpp


diff --git a/engines/dgds/scene.cpp b/engines/dgds/scene.cpp
index 02b325e7d31..0c9283fa6c9 100644
--- a/engines/dgds/scene.cpp
+++ b/engines/dgds/scene.cpp
@@ -1507,6 +1507,8 @@ bool SDSScene::checkDialogActive() {
 				if (action) {
 					// Take a copy of the dialog because the actions might change the scene
 					Dialog dlgCopy = dlg;
+					if (dlgCopy._state)
+						dlgCopy._state->_selectedAction = nullptr;
 					debug(1, "Dialog %d closing: run action (%d ops)", dlg._num, action->sceneOpList.size());
 					if (!runOps(action->sceneOpList)) {
 						// HACK: the scene changed, but we haven't yet drawn the foreground for the




More information about the Scummvm-git-logs mailing list