summaryrefslogtreecommitdiff
path: root/src/runtime/c/pgf/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/c/pgf/parser.c')
-rw-r--r--src/runtime/c/pgf/parser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runtime/c/pgf/parser.c b/src/runtime/c/pgf/parser.c
index d8e150f7e..ee2d13415 100644
--- a/src/runtime/c/pgf/parser.c
+++ b/src/runtime/c/pgf/parser.c
@@ -1148,7 +1148,8 @@ pgf_parsing_lookahead(PgfParsing *ps, PgfParseState* state)
{
PgfSequence* epsilon_seq =
gu_seq_index(ps->concr->sequences, PgfSequence, 0);
- if (gu_seq_length(epsilon_seq->syms) == 0) {
+ if (gu_seq_length(epsilon_seq->syms) == 0 &&
+ epsilon_seq->idx != NULL) {
// Since the sequences are sorted, the epsilon sequence will
// always be the first if there is any at all. We should
// always add the epsilon in the index, because we do