From 6a6091f6d7547d750985f6ee757d5b7c9c2d78b3 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Sun, 27 Jun 2010 04:58:48 +0000 Subject: Prevent execution of the STOP script command when its Zone does not exist. Patch #3021744 by fuzzie with some comments. svn-id: r50363 --- engines/parallaction/exec_br.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'engines') 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. -- cgit v1.2.3