[Scummvm-cvs-logs] SF.net SVN: scummvm: [32972] scummvm/trunk/engines/parallaction

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Wed Jul 9 04:49:20 CEST 2008


Revision: 32972
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32972&view=rev
Author:   peres001
Date:     2008-07-08 19:49:20 -0700 (Tue, 08 Jul 2008)

Log Message:
-----------
Added a couple of NULLity checks.

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/gfxbase.cpp
    scummvm/trunk/engines/parallaction/sound.cpp

Modified: scummvm/trunk/engines/parallaction/gfxbase.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/gfxbase.cpp	2008-07-09 02:27:05 UTC (rev 32971)
+++ scummvm/trunk/engines/parallaction/gfxbase.cpp	2008-07-09 02:49:20 UTC (rev 32972)
@@ -133,7 +133,9 @@
 //		return;
 //	}
 
-	assert(obj);
+	if (!obj) {
+		return;
+	}
 
 	if (visible) {
 		obj->setFlags(kGfxObjVisible);

Modified: scummvm/trunk/engines/parallaction/sound.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/sound.cpp	2008-07-09 02:27:05 UTC (rev 32971)
+++ scummvm/trunk/engines/parallaction/sound.cpp	2008-07-09 02:49:20 UTC (rev 32972)
@@ -249,6 +249,9 @@
 }
 
 void DosSoundMan::playCharacterMusic(const char *character) {
+	if (character == NULL) {
+		return;
+	}
 
 	if (!scumm_stricmp(_vm->_location._name, "night") ||
 		!scumm_stricmp(_vm->_location._name, "intsushi")) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list