summaryrefslogtreecommitdiff
path: root/src/group_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/group_cmd.cpp')
-rw-r--r--src/group_cmd.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/group_cmd.cpp b/src/group_cmd.cpp
index c1698bbe4..84aa0b39e 100644
--- a/src/group_cmd.cpp
+++ b/src/group_cmd.cpp
@@ -134,6 +134,9 @@ CommandCost CmdDeleteGroup(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (v->group_id == g->index && v->type == g->vehicle_type) v->group_id = DEFAULT_GROUP;
}
+ /* Update backupped orders if needed */
+ if (_backup_orders_data.group == g->index) _backup_orders_data.group = DEFAULT_GROUP;
+
/* If we set an autoreplace for the group we delete, remove it. */
if (_current_player < MAX_PLAYERS) {
Player *p;