[Scummvm-cvs-logs] scummvm master -> 8dbfcc37fb69c890404c6bba38ae07d0e1040115

Strangerke Strangerke at scummvm.org
Sun Jun 15 18:22:24 CEST 2014


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:
8dbfcc37fb CRUISE: Add a safeguard to avoid a potential null pointer derefenrece


Commit: 8dbfcc37fb69c890404c6bba38ae07d0e1040115
    https://github.com/scummvm/scummvm/commit/8dbfcc37fb69c890404c6bba38ae07d0e1040115
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-06-15T18:19:11+02:00

Commit Message:
CRUISE: Add a safeguard to avoid a potential null pointer derefenrece

Changed paths:
    engines/cruise/cruise_main.cpp



diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp
index 2de8d27..0ad1416 100644
--- a/engines/cruise/cruise_main.cpp
+++ b/engines/cruise/cruise_main.cpp
@@ -934,8 +934,11 @@ bool createDialog(int objOvl, int objIdx, int x, int y) {
 									else
 										color = -1;
 
-									ptr = getObjectName(ptrHead->obj1Number, ovl3->arrayNameObj);
-									addSelectableMenuEntry(j, i, menuTable[0], 1, color, ptr);
+									if (ovl3) {
+										ptr = getObjectName(ptrHead->obj1Number, ovl3->arrayNameObj);
+										addSelectableMenuEntry(j, i, menuTable[0], 1, color, ptr);
+									} else
+										error("Unexpected null pointer in createDialog()");
 								}
 							}
 						}






More information about the Scummvm-git-logs mailing list