From: vsr Date: Mon, 16 Nov 2009 08:37:18 +0000 (+0000) Subject: IPAL21464: fix SIGSEGV in "Create Group" dialog box X-Git-Tag: V5_1_3rc3~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7186694f114a284c377e30a459be271067c334dd;p=modules%2Fsmesh.git IPAL21464: fix SIGSEGV in "Create Group" dialog box --- diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx index b83c7ee11..a9a3df7f8 100644 --- a/src/Controls/SMESH_Controls.cxx +++ b/src/Controls/SMESH_Controls.cxx @@ -1938,8 +1938,10 @@ bool ElemGeomType::IsSatisfy( long theId ) { if (!myMesh) return false; const SMDS_MeshElement* anElem = myMesh->FindElement( theId ); + if ( !anElem ) + return false; const SMDSAbs_ElementType anElemType = anElem->GetType(); - if ( !anElem || (myType != SMDSAbs_All && anElemType != myType) ) + if ( myType != SMDSAbs_All && anElemType != myType ) return false; const int aNbNode = anElem->NbNodes(); bool isOk = false;