[Scummvm-git-logs] scummvm master -> ccd4fb832a1fe1a0bfc3f796b085789bd1e765d2
dreammaster
noreply at scummvm.org
Mon Aug 10 11:15:27 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
ccd4fb832a M4: RIDDLE: Fix crash when returning from options menu to game menu
Commit: ccd4fb832a1fe1a0bfc3f796b085789bd1e765d2
https://github.com/scummvm/scummvm/commit/ccd4fb832a1fe1a0bfc3f796b085789bd1e765d2
Author: sloanext (46776957+sloanext at users.noreply.github.com)
Date: 2026-08-10T21:15:23+10:00
Commit Message:
M4: RIDDLE: Fix crash when returning from options menu to game menu
menuItemButton::handler accesses the button and its menu again after
running the button callback, unless the callback flags that it closed
the dialog. OptionsMenu::cbGameMenu destroys the options menu (freeing
the button) and creates the game menu, whose allocations reuse the
freed blocks, so the handler then walked a stale item list and crashed.
Changed paths:
engines/m4/riddle/gui/game_menu.cpp
diff --git a/engines/m4/riddle/gui/game_menu.cpp b/engines/m4/riddle/gui/game_menu.cpp
index 2722d9bdce7..6bf95848315 100644
--- a/engines/m4/riddle/gui/game_menu.cpp
+++ b/engines/m4/riddle/gui/game_menu.cpp
@@ -279,6 +279,8 @@ void OptionsMenu::destroyOptionsMenu() {
void OptionsMenu::cbGameMenu(void *, void *) {
destroyOptionsMenu();
+ _GM(buttonClosesDialog) = true;
+
GameMenu::show(nullptr);
}
More information about the Scummvm-git-logs
mailing list