From: Alex Coyte Date: Tue, 8 Aug 2017 01:24:52 +0000 (+1000) Subject: violet: don't bother swapping holders if unable to trim graph X-Git-Tag: v4.6.0^2~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72973ccb478e87dbcf20a2ba9c6e084748c9ded9;p=thirdparty%2Fvectorscan.git violet: don't bother swapping holders if unable to trim graph --- 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); }