#18861 [CEA] Unstable Netgen 1D-2D-3D algorithm: Fix crash caused by improper usage of SObject::GetFather()

This commit is contained in:
vsr 2020-03-16 14:26:51 +03:00
parent 265fc676f5
commit 50dabfbfdf

View File

@ -1457,7 +1457,7 @@ namespace
if ( !io->hasEntry() ) continue; if ( !io->hasEntry() ) continue;
_PTR(SObject) so = SMESH::getStudy()->FindObjectID( io->getEntry() ); _PTR(SObject) so = SMESH::getStudy()->FindObjectID( io->getEntry() );
SMESH::SMESH_Mesh_var mesh; SMESH::SMESH_Mesh_var mesh;
while ( mesh->_is_nil() && so ) while ( mesh->_is_nil() && so && so->GetID() != "0:" )
{ {
CORBA::Object_var obj = SMESH::SObjectToObject( so ); CORBA::Object_var obj = SMESH::SObjectToObject( so );
SMESH::SMESH_IDSource_var isrc = SMESH::SMESH_IDSource::_narrow( obj ); SMESH::SMESH_IDSource_var isrc = SMESH::SMESH_IDSource::_narrow( obj );