Salome HOME
Fix for the issue #593: do not remove naming attribute, but use TNaming_Builder for...
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_ShapeProps.cpp
index f11155bede13d709e4c0e4925fe079f14acf8c09..fcec982022d1855f029f7ee67d410c7c39144ba7 100644 (file)
@@ -30,11 +30,11 @@ std::shared_ptr<GeomAPI_Pnt> GeomAlgoAPI_ShapeProps::centreOfMass(std::shared_pt
 {
   GProp_GProps aGProps;
   if(!theShape) {
-    return NULL;
+    return std::shared_ptr<GeomAPI_Pnt>();
   }
   const TopoDS_Shape& aShape = theShape->impl<TopoDS_Shape>();
   if(aShape.IsNull()) {
-    return NULL;
+    return std::shared_ptr<GeomAPI_Pnt>();
   }
   BRepGProp::SurfaceProperties(aShape, aGProps);
   gp_Pnt aCentre = aGProps.CentreOfMass();