aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/exec_br.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/parallaction/exec_br.cpp')
-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 {