Salome HOME
Use .get() for shared pointers checking
[modules/shaper.git] / src / Model / Model_ResultConstruction.cpp
index 41e1a9b166a43771fac03ba55775eae2b17f9c5c..990dee11e474b2739eb4d24cd5da321c5d28817e 100644 (file)
@@ -44,11 +44,9 @@ std::shared_ptr<GeomAPI_Shape> Model_ResultConstruction::shape()
 
 Model_ResultConstruction::Model_ResultConstruction()
 {
-  myIsDisabled = true; // by default it is not initialized and false to be after created
   myIsInHistory = true;
   myIsInfinite = false;
   myFacesUpToDate = false;
-  setIsConcealed(false);
 }
 
 void Model_ResultConstruction::setIsInHistory(const bool isInHistory)
@@ -68,7 +66,7 @@ int Model_ResultConstruction::facesNum()
       std::list<std::shared_ptr<GeomAPI_Shape> >::iterator aFIter = aFaces.begin();
       for(; aFIter != aFaces.end(); aFIter++) {
         std::shared_ptr<GeomAPI_Face> aFace(new GeomAPI_Face(*aFIter));
-        if (aFace.get())
+        if (aFace.get() && !aFace->isNull())
           myFaces.push_back(aFace);
       }
     }