From 83a48af36adce05d947b79a1726b35e3519f748b Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Sun, 19 Apr 2020 19:26:44 +0200 Subject: [PATCH] add safety check for FindEdges --- libsrc/csg/edgeflw.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libsrc/csg/edgeflw.cpp b/libsrc/csg/edgeflw.cpp index d89e2fd9..644d2cfa 100644 --- a/libsrc/csg/edgeflw.cpp +++ b/libsrc/csg/edgeflw.cpp @@ -1255,6 +1255,9 @@ namespace netgen *testout << "Refsegments, before delete: " << endl << refedges << endl; *testout << "inv: " << endl << refedgesinv << endl; } + + if(refedges.Size() == 0) + throw Exception("No edges found, something wrong."); NgBitArray todelete(refedges.Size()); todelete.Clear();