aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2015-06-18 12:25:55 +0300
committerFilippos Karapetis2015-06-18 12:25:55 +0300
commit5c8001224bc859cb7f04fdb8a7acc25b21c251fe (patch)
treec96a560bc83647f7fb51630aba4e958c184bcd72 /engines
parent5ece075b582418b38f194c1f39a06c8c7343aeeb (diff)
downloadscummvm-rg350-5c8001224bc859cb7f04fdb8a7acc25b21c251fe.tar.gz
scummvm-rg350-5c8001224bc859cb7f04fdb8a7acc25b21c251fe.tar.bz2
scummvm-rg350-5c8001224bc859cb7f04fdb8a7acc25b21c251fe.zip
SHERLOCK: Add a sanity check in checkObject()
This avoids the crash after the second intro scene
Diffstat (limited to 'engines')
-rw-r--r--engines/sherlock/objects.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp
index be6bd4263d..ac5296c79e 100644
--- a/engines/sherlock/objects.cpp
+++ b/engines/sherlock/objects.cpp
@@ -157,6 +157,11 @@ void BaseObject::checkObject() {
++_frameNumber;
do {
+ if (!_sequences) {
+ warning("checkObject: _sequences is not set");
+ break;
+ }
+
// Check for end of sequence
codeFound = checkEndOfSequence();