[Scummvm-git-logs] scummvm branch-3-0 -> 1bb3f1ae12f89e2c6d3822e6eebeb04fcfdf27f4

dreammaster noreply at scummvm.org
Thu Nov 20 07:02:32 UTC 2025


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:
1bb3f1ae12 BAGEL: MINIGAMES: Fix crash in Maze O Doom demo rules dialog


Commit: 1bb3f1ae12f89e2c6d3822e6eebeb04fcfdf27f4
    https://github.com/scummvm/scummvm/commit/1bb3f1ae12f89e2c6d3822e6eebeb04fcfdf27f4
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-11-19T23:02:22-08:00

Commit Message:
BAGEL: MINIGAMES: Fix crash in Maze O Doom demo rules dialog

Changed paths:
    engines/bagel/hodjnpodj/hnplibs/rules.cpp


diff --git a/engines/bagel/hodjnpodj/hnplibs/rules.cpp b/engines/bagel/hodjnpodj/hnplibs/rules.cpp
index 66422e4dcce..716e1d09dca 100644
--- a/engines/bagel/hodjnpodj/hnplibs/rules.cpp
+++ b/engines/bagel/hodjnpodj/hnplibs/rules.cpp
@@ -258,16 +258,17 @@ void CRules::OnDestroy() {
 	//if (hNewCursor != nullptr);
 	SetCursor(hNewCursor);
 
-	if (pNarrative != nullptr)                         // end the narration
-		delete pNarrative;
-
-	if (pOKButton != nullptr)                          // release the button
-		delete pOKButton;
-
-	delete pFont;                                   // release the font file
+	// Free the objects
+	delete pNarrative;
+	pNarrative = nullptr;
+	delete pOKButton;
+	pOKButton = nullptr;
+	delete pFont;
+	pFont = nullptr;
 
 	(*pHelpFile).Close();                           // close and release the rules file
 	delete pHelpFile;
+	pHelpFile = nullptr;
 
 	if (pBackgroundBitmap != nullptr) {
 		bUpdateNeeded = (*pParentWnd).GetUpdateRect(nullptr, false);




More information about the Scummvm-git-logs mailing list