mustmalloc_h, mustrealloc_h: assert on error
This commit is contained in:
6
vendor/librw/src/engine.cpp
vendored
6
vendor/librw/src/engine.cpp
vendored
@@ -143,8 +143,7 @@ void *mustmalloc_h(size_t sz, uint32 hint)
|
||||
ret = Engine::memfuncs.rwmalloc(sz, hint);
|
||||
if(ret || sz == 0)
|
||||
return ret;
|
||||
fprintf(stderr, "Error: out of memory\n");
|
||||
exit(1);
|
||||
assert(ret != 0);
|
||||
return nil;
|
||||
}
|
||||
void *mustrealloc_h(void *p, size_t sz, uint32 hint)
|
||||
@@ -153,8 +152,7 @@ void *mustrealloc_h(void *p, size_t sz, uint32 hint)
|
||||
ret = Engine::memfuncs.rwrealloc(p, sz, hint);
|
||||
if(ret || sz == 0)
|
||||
return ret;
|
||||
fprintf(stderr, "Error: out of memory\n");
|
||||
exit(1);
|
||||
assert(ret != 0);
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user