[Scummvm-git-logs] scummvm master -> 7c167364c0a7ba736a38d5ddd1de8e9412d9940b
Strangerke
noreply at scummvm.org
Sat May 18 07:48:33 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:
7c167364c0 BAGEL: Add a check to avoid a potential null dereferencing in CBagSaveDialog(CID 1544826)
Commit: 7c167364c0a7ba736a38d5ddd1de8e9412d9940b
https://github.com/scummvm/scummvm/commit/7c167364c0a7ba736a38d5ddd1de8e9412d9940b
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2024-05-18T08:48:26+01:00
Commit Message:
BAGEL: Add a check to avoid a potential null dereferencing in CBagSaveDialog(CID 1544826)
Changed paths:
engines/bagel/dialogs/save_dialog.cpp
diff --git a/engines/bagel/dialogs/save_dialog.cpp b/engines/bagel/dialogs/save_dialog.cpp
index ed68a2d4851..c6a1f78798a 100644
--- a/engines/bagel/dialogs/save_dialog.cpp
+++ b/engines/bagel/dialogs/save_dialog.cpp
@@ -102,10 +102,13 @@ ErrorCode CBagSaveDialog::attach() {
// Save off the current game's palette
_pSavePalette = CBofApp::getApp()->getPalette();
+ CBofPalette *pPal = nullptr;
// Insert ours
- CBofPalette *pPal = _pBackdrop->getPalette();
- CBofApp::getApp()->setPalette(pPal);
-
+ if (_pBackdrop != nullptr) {
+ pPal = _pBackdrop->getPalette();
+ CBofApp::getApp()->setPalette(pPal);
+ }
+
// Paint the SaveList Box onto the background
if (_pBackdrop != nullptr) {
CBofBitmap cBmp(buildSysDir("SAVELIST.BMP"), pPal);
More information about the Scummvm-git-logs
mailing list