(svn r15568) -Cleanup: *allocT/AllocaM doesn't return NULL when allocating fails

This commit is contained in:
smatz
2009-02-24 20:59:17 +00:00
parent 8beca127dd
commit d73c1fa7bf
10 changed files with 5 additions and 50 deletions

View File

@@ -52,11 +52,6 @@ void AllocateMap(uint size_x, uint size_y)
free(_m);
free(_me);
/* XXX @todo handle memory shortage more gracefully
* CallocT does the out-of-memory check
* Maybe some attemps could be made to try with smaller maps down to 64x64
* Maybe check for available memory before doing the calls, after all, we know how big
* the map is */
_m = CallocT<Tile>(_map_size);
_me = CallocT<TileExtended>(_map_size);
}