summaryrefslogtreecommitdiff
path: root/src/group_gui.cpp
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2007-12-08 15:47:23 +0000
committerglx <glx@openttd.org>2007-12-08 15:47:23 +0000
commitb47bce651e64ddeab722f599c0a682281b626c45 (patch)
treea45a623dcb65481ea9d84f6b9645584f075b7849 /src/group_gui.cpp
parent2256d9d378365850ba247e7e02631cf458a4fca2 (diff)
downloadopenttd-b47bce651e64ddeab722f599c0a682281b626c45.tar.xz
(svn r11600) -Cleanup: remove extra out-of-memory checks, since it's now done in *allocT functions.
Diffstat (limited to 'src/group_gui.cpp')
-rw-r--r--src/group_gui.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/group_gui.cpp b/src/group_gui.cpp
index e4e0361b1..ce4742a92 100644
--- a/src/group_gui.cpp
+++ b/src/group_gui.cpp
@@ -43,9 +43,6 @@ static void BuildGroupList(grouplist_d* gl, PlayerID owner, VehicleType vehicle_
if (!(gl->l.flags & VL_REBUILD)) return;
list = MallocT<const Group*>(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* gl, PlayerID owner, VehicleType vehicle_
free((void*)gl->sort_list);
gl->sort_list = MallocT<const Group *>(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];