summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/order_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index 508a35064..2b8d4926f 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;
}
}