Fix for the issue 0020885: EDF 607 SMESH: Measure tools

(See Additional Note 10037)
This commit is contained in:
rnv 2010-12-28 16:29:23 +00:00
parent 8e1434e86d
commit 0b0fc19f70

View File

@ -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 )