1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-30 09:59:10 +00:00

(svn r21360) -Fix [FS#4281]: crash when randomised action2 was used when resolving the image to draw in the buy menu

This commit is contained in:
rubidium
2010-11-30 14:11:29 +00:00
parent b6c2216749
commit 21cf75951c

View File

@@ -95,7 +95,8 @@ INSTANTIATE_NEWGRF_CLASS_METHODS(ObjectClass, ObjectSpec, ObjectClassID, OBJECT_
static uint32 ObjectGetRandomBits(const ResolverObject *object)
{
return IsTileType(object->u.object.tile, MP_OBJECT) ? GetObjectRandomBits(object->u.object.tile) : 0;
TileIndex t = object->u.object.tile;
return IsValidTile(t) && IsTileType(t, MP_OBJECT) ? GetObjectRandomBits(t) : 0;
}
static uint32 ObjectGetTriggers(const ResolverObject *object)