aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2017-01-09 18:35:11 +0100
committerEugene Sandulenko2017-01-09 18:35:11 +0100
commit2d29e5db29f0e38a83f1192d9f74832948c80447 (patch)
tree1b9f22a65094ed0990b8039ddc2f4f4d41d559d5 /engines
parentc18a3e28e2c1764b08088a0a1a7f5ec54a2db23a (diff)
downloadscummvm-rg350-2d29e5db29f0e38a83f1192d9f74832948c80447.tar.gz
scummvm-rg350-2d29e5db29f0e38a83f1192d9f74832948c80447.tar.bz2
scummvm-rg350-2d29e5db29f0e38a83f1192d9f74832948c80447.zip
DIRECTOR: Add sanity check to 'go to' functions
Diffstat (limited to 'engines')
-rw-r--r--engines/director/lingo/lingo-funcs.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/director/lingo/lingo-funcs.cpp b/engines/director/lingo/lingo-funcs.cpp
index 6becd1410d..0deab0760c 100644
--- a/engines/director/lingo/lingo-funcs.cpp
+++ b/engines/director/lingo/lingo-funcs.cpp
@@ -200,14 +200,23 @@ void Lingo::func_goto(Datum &frame, Datum &movie) {
}
void Lingo::func_gotoloop() {
+ if (!_vm->_currentScore)
+ return;
+
_vm->_currentScore->gotoloop();
}
void Lingo::func_gotonext() {
+ if (!_vm->_currentScore)
+ return;
+
_vm->_currentScore->gotonext();
}
void Lingo::func_gotoprevious() {
+ if (!_vm->_currentScore)
+ return;
+
_vm->_currentScore->gotoprevious();
}