(svn r19748) -Fix (r19743): Callback 22 and 38 are called with ind == NULL.
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user