From 72973ccb478e87dbcf20a2ba9c6e084748c9ded9 Mon Sep 17 00:00:00 2001 From: Alex Coyte Date: Tue, 8 Aug 2017 11:24:52 +1000 Subject: [PATCH] violet: don't bother swapping holders if unable to trim graph --- src/nfagraph/ng_violet.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/nfagraph/ng_violet.cpp b/src/nfagraph/ng_violet.cpp index 0a3a97a0..7a4de5f5 100644 --- a/src/nfagraph/ng_violet.cpp +++ b/src/nfagraph/ng_violet.cpp @@ -1713,6 +1713,11 @@ void removeRedundantLiteralsFromInfix(const NGHolder &h, RoseInGraph &ig, continue; } + if (!delay) { + /* unable to trim graph --> no point swapping to new holder */ + continue; + } + assert(isCorrectlyTopped(*h_new)); graphs[right] = make_pair(h_new, delay); }