From 164d0a4710b4bc898abd5a1c31c827765fd8ed26 Mon Sep 17 00:00:00 2001 From: glx Date: Sun, 2 Dec 2007 20:13:12 +0000 Subject: [PATCH] (svn r11561) -Fix [FS#1504] (r11463): group list was not updated when removing the last group --- src/group_gui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/group_gui.cpp b/src/group_gui.cpp index a4cd5581af..e4e0361b1e 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -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(GetGroupArraySize()); - if (list == NULL) { + if (GetGroupArraySize() != 0 && list == NULL) { error("Could not allocate memory for the group-sorting-list"); }