From 083a2c6e0df5736184817a6770a2213f36e224bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Thu, 14 Jul 2016 09:14:11 +0200 Subject: [PATCH] Boolean: Prevent rare exception where an encountered segment is not part of a valid path anymore. Relates to #1091 --- src/path/PathItem.Boolean.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/path/PathItem.Boolean.js b/src/path/PathItem.Boolean.js index 916c9587..93e292be 100644 --- a/src/path/PathItem.Boolean.js +++ b/src/path/PathItem.Boolean.js @@ -527,7 +527,7 @@ PathItem.inject(new function() { // are bringing us back to the beginning, and are both valid, // meaning they are part of the boolean result. if (seg !== exclude && (isStart(seg) || isStart(nextSeg) - || !seg._visited && !nextSeg._visited + || nextSeg && !seg._visited && !nextSeg._visited // Self-intersections (!operator) don't need isValid() calls && (!operator || isValid(seg) && (isValid(nextSeg) // If the next segment isn't valid, its intersection