added error when failing to expand world
parent
e6b66884ec
commit
544f18e9c6
|
@ -16,6 +16,7 @@ int _expand_world() {
|
|||
size_t new_num = _world_objects.num * 2;
|
||||
object_t** new_list = realloc(_world_objects.objects, new_num * sizeof(object_t*));
|
||||
if(new_list == NULL) {
|
||||
printf("ERROR: failed to expand world when requesting additional objects\n");
|
||||
return 0;
|
||||
} else {
|
||||
_world_objects.objects = new_list;
|
||||
|
|
Loading…
Reference in New Issue