Salome HOME
fix bug 10959. Initialize GEOM_Gen if necessary
authoreap <eap@opencascade.com>
Mon, 19 Dec 2005 15:30:18 +0000 (15:30 +0000)
committereap <eap@opencascade.com>
Mon, 19 Dec 2005 15:30:18 +0000 (15:30 +0000)
src/SMESHFiltersSelection/SMESH_NumberFilter.cxx

index 692251556445c8498576573c090465265eb499b8..176cd3fb6bc52eb5b186f81c999834bb0ac4cec5 100644 (file)
@@ -102,6 +102,8 @@ bool SMESH_NumberFilter::isOk (const SUIT_DataOwner* theDataOwner) const
 
   // Get shape from geom object and verify its parameters
   GEOM_Client aGeomClient;
 
   // Get shape from geom object and verify its parameters
   GEOM_Client aGeomClient;
+  if ( CORBA::is_nil( GeometryGUI::GetGeomGen() ) && !GeometryGUI::InitGeomGen() )
+    return false;
   TopoDS_Shape aShape = aGeomClient.GetShape(GeometryGUI::GetGeomGen(), aGeomObj);
   if (aShape.IsNull() ||
       !myShapeTypes.Contains(aShape.ShapeType()))
   TopoDS_Shape aShape = aGeomClient.GetShape(GeometryGUI::GetGeomGen(), aGeomObj);
   if (aShape.IsNull() ||
       !myShapeTypes.Contains(aShape.ShapeType()))