Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Avoid crash at "import smesh_selection" in terminal mode
[modules/smesh.git]
/
src
/
SMESH_SWIG_WITHIHM
/
libSMESH_Swig.cxx
diff --git
a/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx
b/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx
index f44a29d9046baa1ab4d765c8e6da018da6071159..8e8ed0ad832e96d9efcf0ef438076f7e065030c5 100644
(file)
--- a/
src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx
+++ b/
src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx
@@
-564,8
+564,11
@@
void SMESH_Swig::init()
};
// load SMESH GUI if it's not yet loaded
};
// 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();
+ }
}
/////////////////////////////////////////////////////////////////
}
/////////////////////////////////////////////////////////////////