Make sure that the entity to be printed is valid.

Especially after savegame load not all slots in the edicts array may be
used. Check if the current entity has a classname string. This is
another part of #430.
This commit is contained in:
Yamagi Burmeister 2019-09-07 14:27:21 +02:00
parent c41f61f8fb
commit 90c2ac8946

View file

@ -1339,6 +1339,12 @@ Cmd_ListEntities_f(edict_t *ent)
edict_t *cur = &g_edicts[i];
qboolean print = false;
/* Ensure that the entity is valid. */
if (!cur->classname)
{
continue;
}
if (all)
{
print = true;