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)
|
static uint32 IndustryGetRandomBits(const ResolverObject *object)
|
||||||
{
|
{
|
||||||
const Industry *ind = object->u.industry.ind;
|
const Industry *ind = object->u.industry.ind;
|
||||||
assert(ind != NULL);
|
return ind != NULL ? ind->random: 0;
|
||||||
return ind->random;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32 IndustryGetTriggers(const ResolverObject *object)
|
static uint32 IndustryGetTriggers(const ResolverObject *object)
|
||||||
{
|
{
|
||||||
const Industry *ind = object->u.industry.ind;
|
const Industry *ind = object->u.industry.ind;
|
||||||
assert(ind != NULL);
|
return ind != NULL ? ind->random_triggers : 0;
|
||||||
return ind->random_triggers;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void IndustrySetTriggers(const ResolverObject *object, int triggers)
|
static void IndustrySetTriggers(const ResolverObject *object, int triggers)
|
||||||
|
|
Loading…
Reference in New Issue