Salome HOME
Merge remote branch 'origin/V8_5_asterstudy'
[modules/smesh.git] / src / SMESH_SWIG_WITHIHM / libSMESH_Swig.cxx
index f44a29d9046baa1ab4d765c8e6da018da6071159..b36929250b9aec6219174857f350c7991eb2054b 100644 (file)
@@ -564,8 +564,11 @@ void SMESH_Swig::init()
   };
 
   // load SMESH GUI if it's not yet loaded
-  ProcessVoidEvent( new TInitEvent() );
-  SMESHGUI::GetSMESHGen()->UpdateStudy();
+  if ( SUIT_Session::session() )
+  {
+    ProcessVoidEvent( new TInitEvent() );
+    SMESHGUI::GetSMESHGen()->UpdateStudy();
+  }
 }
 
 /////////////////////////////////////////////////////////////////
@@ -2047,8 +2050,9 @@ public:
     SVTK_IndexedMapOfIds idMap;
     selector->GetCompositeIndex( actor->getIO(), idMap );
 
-    for ( int i = 1; i <= idMap.Extent(); i++ )
-      myResult.push_back( std::make_pair<int,int>( (int)idMap( i )[0], (int)idMap( i )[1]) );
+    for ( int i = 1; i <= idMap.Extent(); i++ ) {
+      myResult.push_back( std::make_pair( (int)idMap(i)[0], (int)idMap(i)[1]) );
+       }
   }
 };