summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/station_cmd.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 546aecc26..46ded9a1d 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -2389,7 +2389,9 @@ static CommandCost RemoveAirport(TileIndex tile, DoCommandFlag flags)
const Aircraft *a;
FOR_ALL_AIRCRAFT(a) {
if (!a->IsNormalAircraft()) continue;
- if (a->targetairport == st->index && a->state != FLYING) return CMD_ERROR;
+ if (a->targetairport == st->index && a->state != FLYING) {
+ return_cmd_error(STR_ERROR_AIRCRAFT_IN_THE_WAY);
+ }
}
if (flags & DC_EXEC) {