diff options
author | Travis Howell | 2005-03-13 00:04:32 +0000 |
---|---|---|
committer | Travis Howell | 2005-03-13 00:04:32 +0000 |
commit | 82c354b9d4f1c5ca15a37fde10d6be88a90679db (patch) | |
tree | e82a019bbbb25852a20063901bb6dbc03f8ea070 | |
parent | 44205266e8dc5236fa6a545f9d198923b87000bc (diff) | |
download | scummvm-rg350-82c354b9d4f1c5ca15a37fde10d6be88a90679db.tar.gz scummvm-rg350-82c354b9d4f1c5ca15a37fde10d6be88a90679db.tar.bz2 scummvm-rg350-82c354b9d4f1c5ca15a37fde10d6be88a90679db.zip |
A few extra bits
svn-id: r17110
-rw-r--r-- | scumm/object.cpp | 5 |
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)); |