From: mpv Date: Tue, 24 Jul 2018 07:03:20 +0000 (+0300) Subject: Fix for the issue #2572 : Crash at attempt to perform "Remove Sub-Shapes" operation X-Git-Tag: SHAPER_V9_1_0RC1~73^2~41 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f35f96055f803204cf595a8c9e5a4cc250ab6d43;p=modules%2Fshaper.git Fix for the issue #2572 : Crash at attempt to perform "Remove Sub-Shapes" operation --- diff --git a/src/Model/Model_BodyBuilder.cpp b/src/Model/Model_BodyBuilder.cpp index 1a8ea5507..50ee39ca8 100755 --- a/src/Model/Model_BodyBuilder.cpp +++ b/src/Model/Model_BodyBuilder.cpp @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -369,7 +370,8 @@ void Model_BodyBuilder::loadDeletedShapes (GeomAlgoAPI_MakeShape* theMS, if (theMS->isDeleted (aRShape)) { if (!aResultShape->isSubShape(aRShape, false)) { ListOfShape aHist; - theMS->modified(aRShape, aHist); + if (BRepTools_History::IsSupportedType(aRoot)) // to avoid crash in #2572 + theMS->modified(aRShape, aHist); if (aHist.size() == 0 || (aHist.size() == 1 && aHist.front()->isSame(aRShape))) builder(theTag)->Delete(aRoot); }