mirror of https://github.com/OpenTTD/OpenTTD
(svn r21360) -Fix [FS#4281]: crash when randomised action2 was used when resolving the image to draw in the buy menu
parent
b6c2216749
commit
21cf75951c
|
@ -95,7 +95,8 @@ INSTANTIATE_NEWGRF_CLASS_METHODS(ObjectClass, ObjectSpec, ObjectClassID, OBJECT_
|
||||||
|
|
||||||
static uint32 ObjectGetRandomBits(const ResolverObject *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)
|
static uint32 ObjectGetTriggers(const ResolverObject *object)
|
||||||
|
|
Loading…
Reference in New Issue