From 7827086b54fbe2d9f958a5cd9e366ca7698c91da Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 13 Jan 2010 06:42:59 +0000 Subject: [PATCH] make sure we actually have a stack frame --- libs/gamecode/engine/pr_strings.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/gamecode/engine/pr_strings.c b/libs/gamecode/engine/pr_strings.c index 78a83a3e8..e781ce030 100644 --- a/libs/gamecode/engine/pr_strings.c +++ b/libs/gamecode/engine/pr_strings.c @@ -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;