]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Fix for IPAL12128 : CRASH after trying to run dataflow from the restored study with...
authormkr <mkr@opencascade.com>
Thu, 13 Apr 2006 14:05:11 +0000 (14:05 +0000)
committermkr <mkr@opencascade.com>
Thu, 13 Apr 2006 14:05:11 +0000 (14:05 +0000)
src/GEOM_I_Superv/GEOM_Superv_i.cc

index ff1ebd242fb519046b0d151e6c705b669739bacf..38455e4ce7088d97954df29dce49385d3b561ccb 100644 (file)
@@ -108,8 +108,12 @@ void GEOM_Superv_i::SetStudyID( CORBA::Long theId )
     SALOME::Session_var aSession = SALOME::Session::_narrow(anObject);
     if ( !CORBA::is_nil(aSession) ) {
       int aStudyID = aSession->GetActiveStudyId();
-      if ( theId != aStudyID ) MESSAGE("Warning : given study ID theId="<<theId<<" is wrong and will be replaced by the value "<<aStudyID);
-      myStudyID = aStudyID;
+      if ( theId != aStudyID && aStudyID > 0) { // mkr : IPAL12128
+       MESSAGE("Warning : given study ID theId="<<theId<<" is wrong and will be replaced by the value "<<aStudyID);
+       myStudyID = aStudyID;
+      }
+      else
+       myStudyID = theId; // mkr : IPAL12128
     }
   }