Salome HOME
Regression bugs_00/A3
[modules/smesh.git] / src / SMESH_I / SMESH_Gen_i_1.cxx
index f155ae93d20ed6714e37a0d8ed3b7f0c9e6b6bca..6890bcf08e1f9867328a4ba193256c9305b2a519 100644 (file)
@@ -160,7 +160,7 @@ long SMESH_Gen_i::GetBallElementsGroupsTag()
 bool SMESH_Gen_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
 {
   if(MYDEBUG) MESSAGE("CanPublishInStudy - "<<!CORBA::is_nil(myCurrentStudy));
-  if(CORBA::is_nil(myCurrentStudy))
+  if( GetCurrentStudyID() < 0 )
     return false;
   
   SMESH::SMESH_Mesh_var aMesh       = SMESH::SMESH_Mesh::_narrow(theIOR);