diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index 6b881352ec..a37d296d22 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -254,7 +254,7 @@ static CommandCost RemoveShiplift(TileIndex tile, DoCommandFlag flags) } /* make sure no vehicle is on the tile. */ - ret = EnsureNoVehicleOnGround(tile); + CommandCost ret = EnsureNoVehicleOnGround(tile); if (ret.Succeeded()) ret = EnsureNoVehicleOnGround(tile + delta); if (ret.Succeeded()) ret = EnsureNoVehicleOnGround(tile - delta); ret.SetGlobalErrorMessage();