From 77775df18b724470367a249096344f93fae039c4 Mon Sep 17 00:00:00 2001 From: mpv Date: Tue, 27 Nov 2018 13:52:42 +0300 Subject: [PATCH] Fix for crash if intersection has no result. --- src/FeaturesPlugin/FeaturesPlugin_Intersection.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/FeaturesPlugin/FeaturesPlugin_Intersection.cpp b/src/FeaturesPlugin/FeaturesPlugin_Intersection.cpp index e2a48a026..6c8f51aff 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Intersection.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Intersection.cpp @@ -103,6 +103,12 @@ void FeaturesPlugin_Intersection::loadNamingDS(ResultBodyPtr theResultBody, const GeomMakeShapePtr& theMakeShape) { std::shared_ptr aResultShape = theMakeShape->shape(); + + if(theObjects.front()->isEqual(aResultShape)) { + theResultBody->store(aResultShape, false); + return; + } + theResultBody->storeModified(theObjects.front(), aResultShape); const int aShapeTypesNb = 3; -- 2.39.2