mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
[gamecode] Check for null edict before printing number
Avoids segfault during double-verbose disassembly of progs code that uses entities.
This commit is contained in:
parent
7868936b96
commit
86cf7fbecd
1 changed files with 5 additions and 3 deletions
|
@ -1237,10 +1237,12 @@ pr_debug_entity_view (qfot_type_t *type, pr_type_t *value, void *_data)
|
|||
|
||||
if (pr->pr_edicts) {
|
||||
edict_t *edict = PROG_TO_EDICT (pr, value->entity_var);
|
||||
if (edict) {
|
||||
dasprintf (dstr, "entity %d", NUM_FOR_BAD_EDICT (pr, edict));
|
||||
} else {
|
||||
dasprintf (dstr, "entity [%x]",value->entity_var);
|
||||
return;
|
||||
}
|
||||
}
|
||||
dasprintf (dstr, "entity [%x]", value->entity_var);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue