Fixed an interesting crash that occured when a recycled idparse cbuf was

given to GIB when it pushed the cbuf stack.
This commit is contained in:
Brian Koropoff 2003-05-26 05:07:21 +00:00
parent a4bc588947
commit 9602d6c88d

View file

@ -143,8 +143,12 @@ Cbuf_PushStack (cbuf_interpreter_t *interp)
cbuf_t *new;
if (cbuf_active->down) {
new = cbuf_active->down;
if (new->interpreter != interp) {
new->interpreter->destruct (new);
new->interpreter = interp;
new->interpreter->construct (new);
}
Cbuf_Reset (new);
new->state = CBUF_STATE_NORMAL;
} else
new = Cbuf_New (interp);
cbuf_active->down = new;