make sure we actually have a stack frame

This commit is contained in:
Bill Currie 2010-01-13 06:42:59 +00:00 committed by Jeff Teunissen
parent 997102fea8
commit 7827086b54

View file

@ -515,7 +515,8 @@ PR_FreeTempStrings (progs_t *pr)
t = sr->next;
if (sr->type != str_temp)
PR_Error (pr, "internal string error");
if (R_STRING (pr) < 0 && string_index (pr, sr) == R_STRING (pr)) {
if (R_STRING (pr) < 0 && string_index (pr, sr) == R_STRING (pr)
&& pr->pr_depth) {
prstack_t *frame = pr->pr_stack + pr->pr_depth - 1;
sr->next = frame->tstr;
frame->tstr = sr;