Salome HOME
Patch on regression that was introduced by fix on Bug PAL7444
[modules/smesh.git] / src / SMESH_I / SMESH_Gen_i_1.cxx
index ac8641de2bd5858d9565ca42babe85209531ee41..d3c645941bb8bbf65da35314c8e06cc352d73426 100644 (file)
@@ -146,7 +146,10 @@ long SMESH_Gen_i::GetVolumeGroupsTag()
 
 bool SMESH_Gen_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
 {
-  if(MYDEBUG) MESSAGE("CanPublishInStudy");
+  if(MYDEBUG) MESSAGE("CanPublishInStudy - "<<!CORBA::is_nil(myCurrentStudy));
+  if(CORBA::is_nil(myCurrentStudy))
+    return false;
+  
   SMESH::SMESH_Mesh_var aMesh       = SMESH::SMESH_Mesh::_narrow(theIOR);
   if( !aMesh->_is_nil() )
     return true;