From a294d222136a72534871d2030f828891762146ed Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Wed, 9 Jul 2008 02:49:20 +0000 Subject: Added a couple of NULLity checks. svn-id: r32972 --- engines/parallaction/gfxbase.cpp | 4 +++- engines/parallaction/sound.cpp | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/parallaction/gfxbase.cpp b/engines/parallaction/gfxbase.cpp index 8d7041305d..3e9bd79e5d 100644 --- a/engines/parallaction/gfxbase.cpp +++ b/engines/parallaction/gfxbase.cpp @@ -133,7 +133,9 @@ void Gfx::showGfxObj(GfxObj* obj, bool visible) { // return; // } - assert(obj); + if (!obj) { + return; + } if (visible) { obj->setFlags(kGfxObjVisible); diff --git a/engines/parallaction/sound.cpp b/engines/parallaction/sound.cpp index dd74e8f7aa..d9e78f3a9e 100644 --- a/engines/parallaction/sound.cpp +++ b/engines/parallaction/sound.cpp @@ -249,6 +249,9 @@ void DosSoundMan::stopMusic() { } void DosSoundMan::playCharacterMusic(const char *character) { + if (character == NULL) { + return; + } if (!scumm_stricmp(_vm->_location._name, "night") || !scumm_stricmp(_vm->_location._name, "intsushi")) { -- cgit v1.2.3