]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix for the issue 0020885: EDF 607 SMESH: Measure tools
authorrnv <rnv@opencascade.com>
Tue, 28 Dec 2010 16:29:23 +0000 (16:29 +0000)
committerrnv <rnv@opencascade.com>
Tue, 28 Dec 2010 16:29:23 +0000 (16:29 +0000)
(See Additional Note 10037)

src/OBJECT/SMESH_Object.cxx

index 31a21fef1d800a3fc50d7ebf07abc98ce20ff803..bc9936bc94de19fd20a7c477de7daf283dc3bc19 100644 (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 )