aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction
diff options
context:
space:
mode:
authorNicola Mettifogo2009-03-28 14:38:19 +0000
committerNicola Mettifogo2009-03-28 14:38:19 +0000
commit329c3321e8eb62ce7b73daa41c4bed3e0880a452 (patch)
treee5f3bc63fa1770fb9a24dd5e49ac890b4837233b /engines/parallaction
parentf2d7875db66b8c89a3f6786335045c05a36a1d07 (diff)
downloadscummvm-rg350-329c3321e8eb62ce7b73daa41c4bed3e0880a452.tar.gz
scummvm-rg350-329c3321e8eb62ce7b73daa41c4bed3e0880a452.tar.bz2
scummvm-rg350-329c3321e8eb62ce7b73daa41c4bed3e0880a452.zip
Added workaround for script bug in ticket #2718449.
svn-id: r39724
Diffstat (limited to 'engines/parallaction')
-rw-r--r--engines/parallaction/exec_br.cpp6
1 files changed, 6 insertions, 0 deletions
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 {