aboutsummaryrefslogtreecommitdiff
path: root/scumm/object.cpp
diff options
context:
space:
mode:
authorTravis Howell2005-03-13 00:04:32 +0000
committerTravis Howell2005-03-13 00:04:32 +0000
commit82c354b9d4f1c5ca15a37fde10d6be88a90679db (patch)
treee82a019bbbb25852a20063901bb6dbc03f8ea070 /scumm/object.cpp
parent44205266e8dc5236fa6a545f9d198923b87000bc (diff)
downloadscummvm-rg350-82c354b9d4f1c5ca15a37fde10d6be88a90679db.tar.gz
scummvm-rg350-82c354b9d4f1c5ca15a37fde10d6be88a90679db.tar.bz2
scummvm-rg350-82c354b9d4f1c5ca15a37fde10d6be88a90679db.zip
A few extra bits
svn-id: r17110
Diffstat (limited to 'scumm/object.cpp')
-rw-r--r--scumm/object.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp
index 631e10a3d6..11ba41d06e 100644
--- a/scumm/object.cpp
+++ b/scumm/object.cpp
@@ -174,10 +174,13 @@ int ScummEngine::getObjectImageCount(int object) {
int objnum;
objnum = getObjectIndex(object);
- assert(objnum != -1);
+ if (objnum == -1);
+ return 0;
ptr = getOBIMFromObject(_objs[objnum]);
imhd = (const ImageHeader *)findResourceData(MKID('IMHD'), ptr);
+ if (!imhd)
+ return 0;
if (_version == 8)
return (READ_LE_UINT32(&imhd->v8.image_count));