mirror of https://github.com/OpenTTD/OpenTTD
(svn r19748) -Fix (r19743): Callback 22 and 38 are called with ind == NULL.
parent
50cbdfeed8
commit
eea1a772f2
|
@ -346,15 +346,13 @@ static const SpriteGroup *IndustryResolveReal(const ResolverObject *object, cons
|
|||
static uint32 IndustryGetRandomBits(const ResolverObject *object)
|
||||
{
|
||||
const Industry *ind = object->u.industry.ind;
|
||||
assert(ind != NULL);
|
||||
return ind->random;
|
||||
return ind != NULL ? ind->random: 0;
|
||||
}
|
||||
|
||||
static uint32 IndustryGetTriggers(const ResolverObject *object)
|
||||
{
|
||||
const Industry *ind = object->u.industry.ind;
|
||||
assert(ind != NULL);
|
||||
return ind->random_triggers;
|
||||
return ind != NULL ? ind->random_triggers : 0;
|
||||
}
|
||||
|
||||
static void IndustrySetTriggers(const ResolverObject *object, int triggers)
|
||||
|
|
Loading…
Reference in New Issue