From: rnv Date: Tue, 28 Dec 2010 16:29:23 +0000 (+0000) Subject: Fix for the issue 0020885: EDF 607 SMESH: Measure tools X-Git-Tag: StartingPortingMED3~173 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0b0fc19f70bb80dfac2a40b7f1e50e9a1c5168db;p=modules%2Fsmesh.git Fix for the issue 0020885: EDF 607 SMESH: Measure tools (See Additional Note 10037) --- diff --git a/src/OBJECT/SMESH_Object.cxx b/src/OBJECT/SMESH_Object.cxx index 31a21fef1..bc9936bc9 100644 --- a/src/OBJECT/SMESH_Object.cxx +++ b/src/OBJECT/SMESH_Object.cxx @@ -166,7 +166,12 @@ vtkIdType SMESH_VisualObjDef::GetNodeVTKId( int theObjID ) TMapOfIds::const_iterator i = mySMDS2VTKNodes.find(theObjID); return i == mySMDS2VTKNodes.end() ? -1 : i->second; } - return this->GetMesh()->FindNode(theObjID)->getVtkId(); + + const SMDS_MeshNode* aNode = 0; + if( this->GetMesh() ) { + aNode = this->GetMesh()->FindNode(theObjID); + } + return aNode ? aNode->getVtkId() : -1; } vtkIdType SMESH_VisualObjDef::GetElemObjId( int theVTKID )