diff --git a/src/order_gui.cpp b/src/order_gui.cpp index 508a35064a..2b8d4926fd 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -795,7 +795,7 @@ private: void UpdateAutoRefitState() { this->can_do_autorefit = false; - for (const Vehicle *w = this->vehicle; w != NULL; w = w->Next()) { + for (const Vehicle *w = this->vehicle; w != NULL; w = w->IsGroundVehicle() ? w->Next() : NULL) { if (HasBit(Engine::Get(w->engine_type)->info.misc_flags, EF_AUTO_REFIT)) this->can_do_autorefit = true; } }