From 9239381d564962d9d225d0112fdb8f1c29e3e63f Mon Sep 17 00:00:00 2001 From: stormcone <48624099+stormcone@users.noreply.github.com> Date: Fri, 10 May 2019 19:19:07 +0200 Subject: [PATCH] Fix #7224: Drag and drop vehicle group creation does not work correctly. When drag and drop a vehicle into an empty slot in the vehicle group window it tries to create the new group as the subgroup of the first group (GroupID = 0). This is failing if the dragged vehicle's type is different than the first group's vehicle type. --- src/group_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/group_cmd.cpp b/src/group_cmd.cpp index bd99aa1272..39a945102c 100644 --- a/src/group_cmd.cpp +++ b/src/group_cmd.cpp @@ -536,7 +536,7 @@ CommandCost CmdAddVehicleGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, u if (new_g == NEW_GROUP) { /* Create new group. */ - CommandCost ret = CmdCreateGroup(0, flags, v->type, 0, NULL); + CommandCost ret = CmdCreateGroup(0, flags, v->type, INVALID_GROUP, NULL); if (ret.Failed()) return ret; new_g = _new_group_id;