ULTIMA8: Avoid crash if avatar gone

This can sometimes happen in Remorse after avatar death
if the avatar got blown up
This commit is contained in:
Matthew Duggan 2021-06-07 14:06:52 +09:00
parent 5cb1c555aa
commit 42f6d22fdf

View File

@ -281,7 +281,9 @@ uint16 CameraProcess::findRoof(int32 factor) {
GetLerped(x, y, z, factor);
_earthquake = earthquake_old;
Item *avatar = getItem(1);
assert(avatar);
if (!avatar) // avatar gone?
return 0;
int32 dx, dy, dz;
avatar->getFootpadWorld(dx, dy, dz);
uint16 roofid;