- Engines::Component_var comp = QAD_Application::getDesktop()->getEngine( "FactoryServer", "GEOM" );
- GEOM::GEOM_Gen_var myGeom = GEOM::GEOM_Gen::_narrow( comp );
+ static GEOM::GEOM_Gen_var myGeom;
+ if(CORBA::is_nil(myGeom) {
+ Engines::Component_var comp = QAD_Application::getDesktop()->getEngine( "FactoryServer", "GEOM" );
+ myGeom = GEOM::GEOM_Gen::_narrow( comp );
+ }