mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 23:11:38 +00:00
[gamecode] Check for nil entity
Fixes a segfault when disassembling progs.dat files that access entity fields as the accessed entity will generally be nil.
This commit is contained in:
parent
139a6aee87
commit
d865095d0b
1 changed files with 1 additions and 1 deletions
|
@ -1600,7 +1600,7 @@ PR_PrintStatement (progs_t *pr, dstatement_t *s, int contents)
|
|||
opval = pr->pr_globals[s->a].entity_var;
|
||||
parm_ind = pr->pr_globals[s->b].uinteger_var;
|
||||
if (parm_ind < pr->progs->entityfields
|
||||
&& opval >= 0
|
||||
&& opval > 0
|
||||
&& opval < pr->pr_edict_area_size) {
|
||||
ed = PROG_TO_EDICT (pr, opval);
|
||||
opval = &E_fld(ed, parm_ind) - pr->pr_globals;
|
||||
|
|
Loading…
Reference in a new issue