aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/exec_br.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2010-06-27 04:58:48 +0000
committerNicola Mettifogo2010-06-27 04:58:48 +0000
commit6a6091f6d7547d750985f6ee757d5b7c9c2d78b3 (patch)
tree2855250b5b4de2c8de5a360ce039630043e9ca17 /engines/parallaction/exec_br.cpp
parentae332b620e13d554563a3a6f9b435ebde6761f7a (diff)
downloadscummvm-rg350-6a6091f6d7547d750985f6ee757d5b7c9c2d78b3.tar.gz
scummvm-rg350-6a6091f6d7547d750985f6ee757d5b7c9c2d78b3.tar.bz2
scummvm-rg350-6a6091f6d7547d750985f6ee757d5b7c9c2d78b3.zip
Prevent execution of the STOP script command when its Zone does not exist. Patch #3021744 by fuzzie with some comments.
svn-id: r50363
Diffstat (limited to 'engines/parallaction/exec_br.cpp')
-rw-r--r--engines/parallaction/exec_br.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/parallaction/exec_br.cpp b/engines/parallaction/exec_br.cpp
index 76e6f0dfe0..1d8724e2d8 100644
--- a/engines/parallaction/exec_br.cpp
+++ b/engines/parallaction/exec_br.cpp
@@ -527,6 +527,11 @@ DECLARE_INSTRUCTION_OPCODE(endif) {
DECLARE_INSTRUCTION_OPCODE(stop) {
ZonePtr z = ctxt._inst->_z;
+
+ // Prevent execution if zone is missing. The known case is "PART2/insegui.scr", which has
+ // "STOP insegui", which doesn't exist (see ticket #3021744 for the gory details)
+ if (!z) return;
+
if (ACTIONTYPE(z) == kZoneHear) {
warning("Parallaction_br::instOp_stop not yet implemented for HEAR zones");
// TODO: stop music or sound effects generated by a zone.