From b02b941bd87bd80d7f573289f6b961d1a1f00167 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 10 Oct 2012 10:44:55 +0000 Subject: [PATCH] protect GetSubShapeByNode() from SIGSEGV at NULL node --- src/SMESH/SMESH_MesherHelper.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.2