diff options
-rw-r--r-- | src/newgrf_engine.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp index 316e07b31..e35d25456 100644 --- a/src/newgrf_engine.cpp +++ b/src/newgrf_engine.cpp @@ -765,7 +765,11 @@ static const SpriteGroup *VehicleResolveReal(const ResolverObject *object, const uint totalsets; 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; |