From 8b2c58b0d15ad2b9253a177e7797232fa74ad7f6 Mon Sep 17 00:00:00 2001 From: jfa Date: Tue, 2 May 2006 06:51:24 +0000 Subject: [PATCH] Fix bug 12290: Exception in Mesh when creating a group on geometry while Geometry module was not activated. --- src/GEOMGUI/GeometryGUI.cxx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index f113bc8f0..31c711744 100644 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -77,16 +77,22 @@ extern "C" { -GEOM::GEOM_Gen_var GeometryGUI::myComponentGeom = GEOM::GEOM_Gen::_nil(); +GEOM::GEOM_Gen_var GeometryGUI::myComponentGeom = GEOM::GEOM_Gen::_nil(); -GEOM::GEOM_Gen_var GeometryGUI::GetGeomGen() { return GeometryGUI::myComponentGeom; } +GEOM::GEOM_Gen_var GeometryGUI::GetGeomGen() +{ + // Bug 12290: exception in Mesh GUI on GEOMBase::GetShape() if Geometry GUI hasn't been loaded + if (CORBA::is_nil(myComponentGeom)) + InitGeomGen(); + return GeometryGUI::myComponentGeom; +} -bool GeometryGUI::InitGeomGen() +bool GeometryGUI::InitGeomGen() { GeometryGUI aGG; - if( CORBA::is_nil( myComponentGeom ) ) return false; - return true; -} + if( CORBA::is_nil( myComponentGeom ) ) return false; + return true; +} //======================================================================= // function : ClientSObjectToObject -- 2.39.2