mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
Do not try to print values from null entities.
This commit is contained in:
parent
66447df6b3
commit
5b8345eecb
1 changed files with 3 additions and 2 deletions
|
@ -900,7 +900,7 @@ PR_PrintStatement (progs_t *pr, dstatement_t *s, int contents)
|
||||||
break;
|
break;
|
||||||
case 'E':
|
case 'E':
|
||||||
{
|
{
|
||||||
edict_t *ed;
|
edict_t *ed = 0;
|
||||||
opval = pr->pr_globals[s->a].entity_var;
|
opval = pr->pr_globals[s->a].entity_var;
|
||||||
parm_ind = pr->pr_globals[s->b].uinteger_var;
|
parm_ind = pr->pr_globals[s->b].uinteger_var;
|
||||||
if (parm_ind < pr->progs->entityfields
|
if (parm_ind < pr->progs->entityfields
|
||||||
|
@ -908,7 +908,8 @@ PR_PrintStatement (progs_t *pr, dstatement_t *s, int contents)
|
||||||
&& opval < pr->pr_edictareasize) {
|
&& opval < pr->pr_edictareasize) {
|
||||||
ed = PROG_TO_EDICT (pr, opval);
|
ed = PROG_TO_EDICT (pr, opval);
|
||||||
opval = &ed->v[parm_ind] - pr->pr_globals;
|
opval = &ed->v[parm_ind] - pr->pr_globals;
|
||||||
} else {
|
}
|
||||||
|
if (!ed) {
|
||||||
str = "bad entity.field";
|
str = "bad entity.field";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue