adding an assert (better paranoid than letting a null pointer slip thru)

svn-id: r9207
This commit is contained in:
Max Horn 2003-07-28 00:33:05 +00:00
parent 0d209fecb6
commit 64e0a16a6d

View File

@ -242,6 +242,7 @@ void Scumm::getObjectXYPos(int object, int &x, int &y, int &dir) {
return;
}
imhd = (const ImageHeader *)findResourceData(MKID('IMHD'), ptr);
assert(imhd);
if (_version == 8) {
x = od.x_pos + (int32)READ_LE_UINT32(&imhd->v8.hotspot[state].x);
y = od.y_pos + (int32)READ_LE_UINT32(&imhd->v8.hotspot[state].y);