From: Michael D. Lowis Date: Wed, 15 Oct 2014 01:47:07 +0000 (-0400) Subject: fixed segfault on osx X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=c3dddf07221993ec7dccdd87e83b4b7ef25ffc93;p=proto%2Fsclpl.git fixed segfault on osx --- diff --git a/source/sclpl/parser.c b/source/sclpl/parser.c index 5bbf9e5..5202b93 100644 --- a/source/sclpl/parser.c +++ b/source/sclpl/parser.c @@ -62,7 +62,7 @@ bool parser_eof(parser_t* p_parser) { } void parser_resume(parser_t* p_parser) { - if (NULL != p_parser->p_tok) { + if ((NULL != p_parser->p_tok) && (&tok_eof != p_parser->p_tok)) { mem_release(p_parser->p_tok); p_parser->p_tok = NULL; }