# HG changeset patch # User Ryan C. Gordon # Date 1235135007 18000 # Node ID 75e28bb57b2d89367da02be660c954780ef5524d # Parent 29447167fc683753853559e3b93e0c3cdb95c697 Fixed cleanup of Conditionals in pop_source(). diff -r 29447167fc68 -r 75e28bb57b2d mojoshader_preprocessor.c --- a/mojoshader_preprocessor.c Fri Feb 20 01:15:44 2009 -0500 +++ b/mojoshader_preprocessor.c Fri Feb 20 08:03:27 2009 -0500 @@ -588,8 +588,13 @@ // state->filename is a pointer to the filename cache; don't free it here! - while (state->conditional_stack) - put_conditional(ctx, state->conditional_stack); + Conditional *cond = state->conditional_stack; + while (cond) + { + Conditional *next = cond->next; + put_conditional(ctx, cond); + cond = next; + } // while ctx->include_stack = state->next; put_include(ctx, state);