diff --git a/src/group_gui.cpp b/src/group_gui.cpp --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -43,9 +43,6 @@ static void BuildGroupList(grouplist_d* if (!(gl->l.flags & VL_REBUILD)) return; list = MallocT(GetGroupArraySize()); - if (GetGroupArraySize() != 0 && list == NULL) { - error("Could not allocate memory for the group-sorting-list"); - } FOR_ALL_GROUPS(g) { if (g->owner == owner && g->vehicle_type == vehicle_type) list[n++] = g; @@ -53,9 +50,6 @@ static void BuildGroupList(grouplist_d* free((void*)gl->sort_list); gl->sort_list = MallocT(n); - if (n != 0 && gl->sort_list == NULL) { - error("Could not allocate memory for the group-sorting-list"); - } gl->l.list_length = n; for (uint i = 0; i < n; ++i) gl->sort_list[i] = list[i];