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:
Andrei Alexeyev 2020-03-15 06:57:57 +02:00
parent 6df777b4b8
commit 15593ab207
No known key found for this signature in database
GPG key ID: 363707CD4C7FE8A4

View file

@ -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);