ent_shutdown: panic if any live entities detected
In case this still happens in a release, log the error and try to at least not corrupt the object pools.
This commit is contained in:
parent
6df777b4b8
commit
15593ab207
1 changed files with 1 additions and 5 deletions
|
@ -69,11 +69,7 @@ void ent_init(void) {
|
|||
|
||||
void ent_shutdown(void) {
|
||||
if(entities.num) {
|
||||
log_warn("%u entities were not properly unregistered", entities.num);
|
||||
}
|
||||
|
||||
FOR_EACH_ENT(ent) {
|
||||
ent_unregister(ent);
|
||||
log_fatal_if_debug("%u entities were not properly unregistered, this is a bug!", entities.num);
|
||||
}
|
||||
|
||||
free(entities.array);
|
||||
|
|
Loading…
Reference in a new issue