aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorVladimir Menshakov2010-04-07 07:45:50 +0000
committerVladimir Menshakov2010-04-07 07:45:50 +0000
commitb89b64f71a470c6e0ae4c5413ee6ba058dd2cfcf (patch)
tree65ef18bc4306cb3a350259dfe84b81bea5df2834 /engines
parent9fbf1a113c98aec816edfb4609c07936e591467e (diff)
downloadscummvm-rg350-b89b64f71a470c6e0ae4c5413ee6ba058dd2cfcf.tar.gz
scummvm-rg350-b89b64f71a470c6e0ae4c5413ee6ba058dd2cfcf.tar.bz2
scummvm-rg350-b89b64f71a470c6e0ae4c5413ee6ba058dd2cfcf.zip
fixed crash during time challenges (rclick without object)
svn-id: r48581
Diffstat (limited to 'engines')
-rw-r--r--engines/teenagent/teenagent.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp
index 5940ec8d50..b23dd8f500 100644
--- a/engines/teenagent/teenagent.cpp
+++ b/engines/teenagent/teenagent.cpp
@@ -493,6 +493,10 @@ Common::Error TeenAgentEngine::run() {
// debug(0, "%d, %s", current_object->id, current_object->name.c_str());
if (scene->getId() < 0)
break;
+
+ if (current_object == NULL)
+ break;
+
if (res->dseg.get_byte(0) == 3 && current_object->id == 1) {
processCallback(0x5189); //boo!
break;