From 5a54596fe8790cb7596c6c1bad32b3f62e12b4ab Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Tue, 19 Feb 2013 12:08:48 +0000 Subject: [PATCH] the parser in the C runtime should not crash if the start category is not defined --- src/runtime/c/pgf/parser.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/runtime/c/pgf/parser.c b/src/runtime/c/pgf/parser.c index 80de54ce8..092abb917 100644 --- a/src/runtime/c/pgf/parser.c +++ b/src/runtime/c/pgf/parser.c @@ -1976,10 +1976,9 @@ pgf_parser_init_state(PgfConcr* concr, PgfCId cat, size_t lin_idx, GuPool* pool) { PgfCncCat* cnccat = gu_map_get(concr->cnccats, &cat, PgfCncCat*); - if (!cnccat) { - // error ... - gu_impossible(); - } + if (!cnccat) + return NULL; + gu_assert(lin_idx < cnccat->n_lins); PgfParsing* ps =