From b400c0d697b106e00aad1ea4d91a32de4e29b135 Mon Sep 17 00:00:00 2001 From: mpv Date: Fri, 27 May 2016 17:04:44 +0300 Subject: [PATCH] Fix of the crash on selection of edge of solid in the neutral point --- src/Model/Model_Document.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index 88f8bc6cb..9994a1422 100755 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include #include @@ -1292,6 +1293,8 @@ static Handle(TNaming_NamedShape) searchForOriginalShape(TopoDS_Shape theShape, while(!theShape.IsNull()) { // searching for the very initial shape that produces this one TopoDS_Shape aShape = theShape; theShape.Nullify(); + if (!TNaming_Tool::HasLabel(aMain, aShape)) // to avoid crash of TNaming_SameShapeIterator if pure shape does not exists + break; for(TNaming_SameShapeIterator anIter(aShape, aMain); anIter.More(); anIter.Next()) { TDF_Label aNSLab = anIter.Label(); Handle(TNaming_NamedShape) aNS; -- 2.39.2