From 329c3321e8eb62ce7b73daa41c4bed3e0880a452 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Sat, 28 Mar 2009 14:38:19 +0000 Subject: Added workaround for script bug in ticket #2718449. svn-id: r39724 --- engines/parallaction/exec_br.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'engines/parallaction') diff --git a/engines/parallaction/exec_br.cpp b/engines/parallaction/exec_br.cpp index a6980e5749..a8b89b353e 100644 --- a/engines/parallaction/exec_br.cpp +++ b/engines/parallaction/exec_br.cpp @@ -326,6 +326,12 @@ DECLARE_COMMAND_OPCODE(clear) { } DECLARE_COMMAND_OPCODE(speak) { + // WORKAROUND: this avoids crashing when the zone is not parsed, like in the case + // of script bug in ticket #2718449. + if (!ctxt._cmd->u._zone) { + return; + } + if (ACTIONTYPE(ctxt._cmd->u._zone) == kZoneSpeak) { _vm->enterDialogueMode(ctxt._cmd->u._zone); } else { -- cgit v1.2.3