From: eap Date: Wed, 10 Oct 2012 10:44:55 +0000 (+0000) Subject: protect GetSubShapeByNode() from SIGSEGV at NULL node X-Git-Tag: V6_6_0a1~50 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b02b941bd87bd80d7f573289f6b961d1a1f00167;p=modules%2Fsmesh.git protect GetSubShapeByNode() from SIGSEGV at NULL node --- diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx index ffca47e6a..60d202870 100644 --- a/src/SMESH/SMESH_MesherHelper.cxx +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -329,7 +329,7 @@ bool SMESH_MesherHelper::IsMedium(const SMDS_MeshNode* node, TopoDS_Shape SMESH_MesherHelper::GetSubShapeByNode(const SMDS_MeshNode* node, const SMESHDS_Mesh* meshDS) { - int shapeID = node->getshapeId(); + int shapeID = node ? node->getshapeId() : 0; if ( 0 < shapeID && shapeID <= meshDS->MaxShapeIndex() ) return meshDS->IndexToShape( shapeID ); else