mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
protect GetSubShapeByNode() from SIGSEGV at NULL node
This commit is contained in:
parent
5a4525c20f
commit
b02b941bd8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user