aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2019-11-23 23:58:38 +0100
committerEugene Sandulenko2019-11-23 23:59:00 +0100
commitc5bca8734fe2a373e9439d7a41b291de55e0fb5c (patch)
tree3fb47ed23da8a9748bbdb84a1dd8d0389ef612ee
parent8b7429693d4ea490aef5202077b2e153bd04285a (diff)
downloadscummvm-rg350-c5bca8734fe2a373e9439d7a41b291de55e0fb5c.tar.gz
scummvm-rg350-c5bca8734fe2a373e9439d7a41b291de55e0fb5c.tar.bz2
scummvm-rg350-c5bca8734fe2a373e9439d7a41b291de55e0fb5c.zip
DIRECTOR: Add sanity check to c_play()
-rw-r--r--engines/director/lingo/lingo-funcs.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/director/lingo/lingo-funcs.cpp b/engines/director/lingo/lingo-funcs.cpp
index e17712848a..b28436aea3 100644
--- a/engines/director/lingo/lingo-funcs.cpp
+++ b/engines/director/lingo/lingo-funcs.cpp
@@ -290,6 +290,11 @@ void Lingo::func_play(Datum &frame, Datum &movie) {
return;
}
+ if (!_vm->getCurrentScore()) {
+ warning("Lingo::func_play(): no score");
+ return;
+ }
+
ref.frameI = _vm->getCurrentScore()->getCurrentFrame();
_vm->_movieStack.push_back(ref);