1
0
Fork 0

(svn r19748) -Fix (r19743): Callback 22 and 38 are called with ind == NULL.

release/1.1
frosch 2010-05-01 17:53:25 +00:00
parent 50cbdfeed8
commit eea1a772f2
1 changed files with 2 additions and 4 deletions

View File

@ -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)