diff options
author | Eugene Sandulenko | 2005-02-15 03:32:07 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2005-02-15 03:32:07 +0000 |
commit | 32ea1644a5d140f2bd818c8c5adbb794be01fe44 (patch) | |
tree | 9ae6894b0cd33a292aa9886b1ee75482578108c8 /scumm | |
parent | 94daa9dbccecf1a89b5136898170ee753a690b5d (diff) | |
download | scummvm-rg350-32ea1644a5d140f2bd818c8c5adbb794be01fe44.tar.gz scummvm-rg350-32ea1644a5d140f2bd818c8c5adbb794be01fe44.tar.bz2 scummvm-rg350-32ea1644a5d140f2bd818c8c5adbb794be01fe44.zip |
Fix crash in updated Russian freddi1.
svn-id: r16795
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/object.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp index 081f4c3624..0c9232b9a2 100644 --- a/scumm/object.cpp +++ b/scumm/object.cpp @@ -760,7 +760,8 @@ void ScummEngine::setupRoomObject(ObjectData *od, const byte *room, const byte * cdhd = (const CodeHeader *)findResourceData(MKID('CDHD'), searchptr + od->OBCDoffset); if (cdhd == NULL) error("Room %d missing CDHD blocks(s)", _roomResource); - imhd = (const ImageHeader *)findResourceData(MKID('IMHD'), room + od->OBIMoffset); + if (od->OBIMoffset) + imhd = (const ImageHeader *)findResourceData(MKID('IMHD'), room + od->OBIMoffset); od->flags = Gdi::dbAllowMaskOr; @@ -806,7 +807,7 @@ void ScummEngine::setupRoomObject(ObjectData *od, const byte *room, const byte * od->parent = cdhd->v6.parent; od->actordir = cdhd->v6.actordir; - if (_features & GF_HUMONGOUS) + if (_features & GF_HUMONGOUS && imhd) od->flags = ((imhd->old.flags & 1) != 0) ? Gdi::dbAllowMaskOr : 0; } else { |