X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_Document.cpp;h=0c40c27230db30754d8036b080f676fbbbf0cb2a;hb=a8cfbfb436c27ff96edd5c808e9a452c35cef207;hp=ac473ce216f07c9a20872aaf4c0ce6c95f3627f7;hpb=1caca4db4cda17236f7a9f50fc9c620f6a426372;p=modules%2Fshaper.git diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index ac473ce21..0c40c2723 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;