Salome HOME
BugID IPAL9186: Modified method GetSMESHGen
[modules/smesh.git] / src / SMESHGUI / SMESHGUI.cxx
index f5846d3f22628adc6e3faafc8aef0a34d11ab0e7..2b1da3a9c13cf26b2272c6cafe73671271ba5e4a 100644 (file)
@@ -3077,6 +3077,12 @@ void SMESHGUI::OnGUIEvent()
 
 SMESH::SMESH_Gen_var SMESHGUI::GetSMESHGen()
 {
+   
+  if ( CORBA::is_nil( myComponentSMESH ) )
+    {
+      SMESHGUI aGUI; //SRN BugID: IPAL9186: Create an instance of SMESHGUI to initialize myComponentSMESH
+      return aGUI.myComponentSMESH;
+    }  
   return myComponentSMESH;
 }