Salome HOME
Fix for the issue #1100
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_MakeShapeCustom.cpp
index 318f9b6e5b01afbfdab97825fab51dcfa488bc16..88576740ef4505881b621a1ce0d93189798130eb 100644 (file)
@@ -48,8 +48,9 @@ void GeomAlgoAPI_MakeShapeCustom::generated(const std::shared_ptr<GeomAPI_Shape>
                                             ListOfShape& theHistory)
 {
   ListOfShape aGenerated;
-  myGenerated.find(theShape, aGenerated);
-  theHistory.insert(theHistory.end(), aGenerated.begin(), aGenerated.end());
+  if(myGenerated.find(theShape, aGenerated)) {
+    theHistory.insert(theHistory.end(), aGenerated.begin(), aGenerated.end());
+  }
 }
 
 //=================================================================================================
@@ -57,8 +58,9 @@ void GeomAlgoAPI_MakeShapeCustom::modified(const std::shared_ptr<GeomAPI_Shape>
                                            ListOfShape& theHistory)
 {
   ListOfShape aModified;
-  myModified.find(theShape, aModified);
-  theHistory.insert(theHistory.end(), aModified.begin(), aModified.end());
+  if(myModified.find(theShape, aModified)) {
+    theHistory.insert(theHistory.end(), aModified.begin(), aModified.end());
+  }
 }
 
 //=================================================================================================