(svn r12180) -Fix: Test purchase list loading/loaded sprites instead of unconditionally returning a possibly non-existant sprite.
This commit is contained in:
@@ -765,7 +765,11 @@ static const SpriteGroup *VehicleResolveReal(const ResolverObject *object, const
|
|||||||
uint totalsets;
|
uint totalsets;
|
||||||
uint set;
|
uint set;
|
||||||
|
|
||||||
if (v == NULL) return group->g.real.loading[0];
|
if (v == NULL) {
|
||||||
|
if (group->g.real.num_loading > 0) return group->g.real.loading[0];
|
||||||
|
if (group->g.real.num_loaded > 0) return group->g.real.loaded[0];
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
bool in_motion = v->First()->current_order.type != OT_LOADING;
|
bool in_motion = v->First()->current_order.type != OT_LOADING;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user