mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-04 21:24:16 +05:00
22594: [CEA 1159] Salome crashes when loading a dumped meshing script
Avoid destruction on myHyp when it is unpublished
This commit is contained in:
parent
3d496b2c57
commit
a453a47bea
@ -67,6 +67,8 @@ StdMeshers_LayerDistribution_i::StdMeshers_LayerDistribution_i( PortableServer::
|
||||
StdMeshers_LayerDistribution_i::~StdMeshers_LayerDistribution_i()
|
||||
{
|
||||
MESSAGE( "StdMeshers_LayerDistribution_i::~StdMeshers_LayerDistribution_i" );
|
||||
if ( !myHyp->_is_nil() )
|
||||
myHyp->UnRegister();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -86,6 +88,7 @@ void StdMeshers_LayerDistribution_i::SetLayerDistribution(SMESH::SMESH_Hypothesi
|
||||
bool isNewHyp = ( hyp_i->GetImpl() != this->GetImpl()->GetLayerDistribution() );
|
||||
this->GetImpl()->SetLayerDistribution( hyp_i->GetImpl() );
|
||||
myHyp = SMESH::SMESH_Hypothesis::_duplicate( hyp1D );
|
||||
myHyp->Register();
|
||||
// Remove SO of 1D hypothesis if it was published
|
||||
if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen())
|
||||
{
|
||||
@ -148,6 +151,7 @@ SMESH::SMESH_Hypothesis_ptr StdMeshers_LayerDistribution_i::GetLayerDistribution
|
||||
* Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
CORBA::Boolean StdMeshers_LayerDistribution_i::IsDimSupported( SMESH::Dimension type )
|
||||
{
|
||||
return type == SMESH::DIM_3D;
|
||||
|
Loading…
Reference in New Issue
Block a user