]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for crash if intersection has no result.
authormpv <mpv@opencascade.com>
Tue, 27 Nov 2018 10:52:42 +0000 (13:52 +0300)
committermpv <mpv@opencascade.com>
Tue, 27 Nov 2018 10:53:17 +0000 (13:53 +0300)
src/FeaturesPlugin/FeaturesPlugin_Intersection.cpp

index e2a48a02676b06e3ed06a3137030132a59c7c66b..6c8f51aff1447a0b9cd8e116e34777968892822a 100644 (file)
@@ -103,6 +103,12 @@ void FeaturesPlugin_Intersection::loadNamingDS(ResultBodyPtr theResultBody,
                                                const GeomMakeShapePtr& theMakeShape)
 {
   std::shared_ptr<GeomAPI_Shape> aResultShape = theMakeShape->shape();
+
+  if(theObjects.front()->isEqual(aResultShape)) {
+    theResultBody->store(aResultShape, false);
+    return;
+  }
+
   theResultBody->storeModified(theObjects.front(), aResultShape);
 
   const int aShapeTypesNb = 3;