[Scummvm-cvs-logs] scummvm master -> 60443e49e8f550c9287ec7752aac3efc87ae1da2

Strangerke Strangerke at scummvm.org
Mon Jan 11 07:09:30 CET 2016


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:
60443e49e8 MADS: Check 'dialog' earlier to avoid untested null dereference


Commit: 60443e49e8f550c9287ec7752aac3efc87ae1da2
    https://github.com/scummvm/scummvm/commit/60443e49e8f550c9287ec7752aac3efc87ae1da2
Author: Strangerke (strangerke at scummvm.org)
Date: 2016-01-11T07:02:49+01:00

Commit Message:
MADS: Check 'dialog' earlier to avoid untested null dereference

Changed paths:
    engines/mads/nebular/dialogs_nebular.cpp



diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp
index ede16e1..58e60fe 100644
--- a/engines/mads/nebular/dialogs_nebular.cpp
+++ b/engines/mads/nebular/dialogs_nebular.cpp
@@ -171,12 +171,12 @@ bool DialogsNebular::show(int messageId, int objectId) {
 		crFlag = false;
 	}
 
-	if (!centerFlag)
-		dialog->incNumLines();
-
 	if (!dialog)
 		error("DialogsNebular::show - Uninitialized dialog");
 
+	if (!centerFlag)
+		dialog->incNumLines();
+
 	// Show the dialog
 	_vm->_events->setCursor(CURSOR_ARROW);
 	dialog->show();






More information about the Scummvm-git-logs mailing list