summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/town_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index badcb844c..3ca3e3ddb 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -2419,7 +2419,7 @@ CommandCost CmdDeleteTown(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
try_clear = true;
} else {
/* Tell to find a new town. */
- o->town = NULL;
+ if (flags & DC_EXEC) o->town = NULL;
}
}
}