From c0d8c8e3b25c246484b2130fbe24425e62435659 Mon Sep 17 00:00:00 2001 From: mpv Date: Tue, 24 Jul 2018 10:03:20 +0300 Subject: [PATCH] Fix for the issue #2572 : Crash at attempt to perform "Remove Sub-Shapes" operation --- src/Model/Model_BodyBuilder.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } -- 2.39.2