(svn r11561) -Fix [FS#1504] (r11463): group list was not updated when removing the last group

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
glx 17 years ago
parent b7d8681129
commit 164d0a4710

@ -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…
Cancel
Save