Fix for IPAL12128 : CRASH after trying to run dataflow from the restored study with SALOME started with "--gui" key.

This commit is contained in:
mkr 2006-04-13 14:05:11 +00:00
parent aeeebe32c2
commit d9dd5e1f74

View 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
}
}