mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r11561) -Fix [FS#1504] (r11463): group list was not updated when removing the last group
This commit is contained in:
parent
8ae661b176
commit
5da6900c3f
@ -40,10 +40,10 @@ static void BuildGroupList(grouplist_d* gl, PlayerID owner, VehicleType vehicle_
|
||||
const Group *g;
|
||||
uint n = 0;
|
||||
|
||||
if (!(gl->l.flags & VL_REBUILD) || GetGroupArraySize() == 0) return;
|
||||
if (!(gl->l.flags & VL_REBUILD)) return;
|
||||
|
||||
list = MallocT<const Group*>(GetGroupArraySize());
|
||||
if (list == NULL) {
|
||||
if (GetGroupArraySize() != 0 && list == NULL) {
|
||||
error("Could not allocate memory for the group-sorting-list");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user