mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-13 03:27:28 +05:00
regression SALOME_TESTS/Grids/smesh/bugs_05/F1
Avoid access to a closed study
This commit is contained in:
parent
8b786444b7
commit
896b180efc
@ -2905,8 +2905,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
// ASSERT( theComponent->GetStudy()->StudyId() == myCurrentStudy->StudyId() )
|
// ASSERT( theComponent->GetStudy()->StudyId() == myCurrentStudy->StudyId() )
|
||||||
// san -- in case <myCurrentStudy> differs from theComponent's study,
|
// san -- in case <myCurrentStudy> differs from theComponent's study,
|
||||||
// use that of the component
|
// use that of the component
|
||||||
if ( myCurrentStudy->_is_nil() ||
|
if ( theComponent->GetStudy()->StudyId() != GetCurrentStudyID() )
|
||||||
theComponent->GetStudy()->StudyId() != myCurrentStudy->StudyId() )
|
|
||||||
SetCurrentStudy( theComponent->GetStudy() );
|
SetCurrentStudy( theComponent->GetStudy() );
|
||||||
|
|
||||||
// Store study contents as a set of python commands
|
// Store study contents as a set of python commands
|
||||||
@ -3955,8 +3954,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
{
|
{
|
||||||
INFOS( "SMESH_Gen_i::Load" );
|
INFOS( "SMESH_Gen_i::Load" );
|
||||||
|
|
||||||
if ( myCurrentStudy->_is_nil() ||
|
if ( theComponent->GetStudy()->StudyId() != GetCurrentStudyID() )
|
||||||
theComponent->GetStudy()->StudyId() != myCurrentStudy->StudyId() )
|
|
||||||
SetCurrentStudy( theComponent->GetStudy() );
|
SetCurrentStudy( theComponent->GetStudy() );
|
||||||
|
|
||||||
/* if( !theComponent->_is_nil() )
|
/* if( !theComponent->_is_nil() )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user