diff options
author | glx <glx@openttd.org> | 2007-12-08 15:47:23 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2007-12-08 15:47:23 +0000 |
commit | b47bce651e64ddeab722f599c0a682281b626c45 (patch) | |
tree | a45a623dcb65481ea9d84f6b9645584f075b7849 /src/station_gui.cpp | |
parent | 2256d9d378365850ba247e7e02631cf458a4fca2 (diff) | |
download | openttd-b47bce651e64ddeab722f599c0a682281b626c45.tar.xz |
(svn r11600) -Cleanup: remove extra out-of-memory checks, since it's now done in *allocT functions.
Diffstat (limited to 'src/station_gui.cpp')
-rw-r--r-- | src/station_gui.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/station_gui.cpp b/src/station_gui.cpp index 3d512ef3e..17a2e27a6 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -228,7 +228,6 @@ static void BuildStationsList(plstations_d* sl, PlayerID owner, byte facilities, /* Create array for sorting */ const Station** station_sort = MallocT<const Station*>(GetMaxStationIndex() + 1); - if (station_sort == NULL) error("Could not allocate memory for the station-sorting-list"); DEBUG(misc, 3, "Building station list for player %d", owner); @@ -255,7 +254,6 @@ static void BuildStationsList(plstations_d* sl, PlayerID owner, byte facilities, free((void*)sl->sort_list); sl->sort_list = MallocT<const Station*>(n); - if (n != 0 && sl->sort_list == NULL) error("Could not allocate memory for the station-sorting-list"); sl->list_length = n; for (uint i = 0; i < n; ++i) sl->sort_list[i] = station_sort[i]; |