summaryrefslogtreecommitdiff
path: root/src/unmovable_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/unmovable_cmd.cpp')
-rw-r--r--src/unmovable_cmd.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/unmovable_cmd.cpp b/src/unmovable_cmd.cpp
index 55fe0a4c5..039a0162f 100644
--- a/src/unmovable_cmd.cpp
+++ b/src/unmovable_cmd.cpp
@@ -177,7 +177,9 @@ CommandCost CmdSellLandArea(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
if (!IsOwnedLandTile(tile)) return CMD_ERROR;
if (!CheckTileOwnership(tile) && _current_company != OWNER_WATER) return CMD_ERROR;
- if (!EnsureNoVehicleOnGround(tile)) return CMD_ERROR;
+ CommandCost ret = EnsureNoVehicleOnGround(tile);
+ ret.SetGlobalErrorMessage();
+ if (ret.Failed()) return ret;
if (flags & DC_EXEC) DoClearSquare(tile);