diff --git a/util/ng_corpus_generator.cpp b/util/ng_corpus_generator.cpp index cb195eaf..69e7c4ef 100644 --- a/util/ng_corpus_generator.cpp +++ b/util/ng_corpus_generator.cpp @@ -185,7 +185,7 @@ void findPaths(const NGHolder &g, CorpusProperties &cProps, continue; } - if (!contains(one_way_in, v) && + if (p && !contains(one_way_in, v) && has_greater_than(p->begin(), p->end(), v, cycleLimit)) { // Note that vertices that only have one predecessor don't need // their cycle limit checked, as their predecessors will have