diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2013-02-19 12:08:48 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2013-02-19 12:08:48 +0000 |
| commit | 9cb0b580d3b108fcccc6c8d8bc180af3b852af87 (patch) | |
| tree | 9fba46f3954462bc0d587ee74fd5f24c500d3a07 /src/runtime/c/pgf | |
| parent | 13de2fafb4581c0fe2c814760f13a257984386c0 (diff) | |
the parser in the C runtime should not crash if the start category is not defined
Diffstat (limited to 'src/runtime/c/pgf')
| -rw-r--r-- | src/runtime/c/pgf/parser.c | 7 |
1 files 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 = |
