From: mpv Date: Tue, 27 Nov 2018 10:52:42 +0000 (+0300) Subject: Fix for crash if intersection has no result. X-Git-Tag: End2018~145 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=77775df18b724470367a249096344f93fae039c4;p=modules%2Fshaper.git Fix for crash if intersection has no result. --- 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;