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
b7d8681129
commit
164d0a4710
@ -40,10 +40,10 @@ static void BuildGroupList(grouplist_d* gl, PlayerID owner, VehicleType vehicle_
|
|||||||
const Group *g;
|
const Group *g;
|
||||||
uint n = 0;
|
uint n = 0;
|
||||||
|
|
||||||
if (!(gl->l.flags & VL_REBUILD) || GetGroupArraySize() == 0) return;
|
if (!(gl->l.flags & VL_REBUILD)) return;
|
||||||
|
|
||||||
list = MallocT<const Group*>(GetGroupArraySize());
|
list = MallocT<const Group*>(GetGroupArraySize());
|
||||||
if (list == NULL) {
|
if (GetGroupArraySize() != 0 && list == NULL) {
|
||||||
error("Could not allocate memory for the group-sorting-list");
|
error("Could not allocate memory for the group-sorting-list");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user