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

This commit is contained in:
glx 2007-12-02 20:13:12 +00:00
parent 8ae661b176
commit 5da6900c3f

View File

@ -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");
} }