Commit 795aa796 authored by finetjul's avatar finetjul
Browse files

BUG: Add validity check

In case where the mrml node passed is null, this code crashes.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21552 3bd1e089-480b-0410-8dfb-8563597acbee
parent d126a559
......@@ -320,6 +320,11 @@ vtkMRMLNode* qMRMLSceneAnnotationModel::parentNode(vtkMRMLNode* node)const
vtkMRMLNode* qMRMLSceneAnnotationModel
::activeHierarchyNode(vtkMRMLNode* mrmlNode)const
{
if (!mrmlNode)
{
return 0;
}
Q_D(const qMRMLSceneAnnotationModel);
if(mrmlNode->IsA("vtkMRMLAnnotationHierarchyNode"))
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment