From 37f3a4c7c9884d174fbf36b0fdbfa783b30034bf Mon Sep 17 00:00:00 2001 From: lassoan Date: Mon, 16 Dec 2019 02:20:51 +0000 Subject: [PATCH] BUG: Fix crash in Segment Editor widget when segmentation does node have display node git-svn-id: http://svn.slicer.org/Slicer4/trunk@28679 3bd1e089-480b-0410-8dfb-8563597acbee --- .../Loadable/Segmentations/Widgets/qMRMLSegmentEditorWidget.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Loadable/Segmentations/Widgets/qMRMLSegmentEditorWidget.cxx b/Modules/Loadable/Segmentations/Widgets/qMRMLSegmentEditorWidget.cxx index 7084082e3fc..18e92358989 100644 --- a/Modules/Loadable/Segmentations/Widgets/qMRMLSegmentEditorWidget.cxx +++ b/Modules/Loadable/Segmentations/Widgets/qMRMLSegmentEditorWidget.cxx @@ -955,7 +955,7 @@ bool qMRMLSegmentEditorWidgetPrivate::segmentationDisplayableInView(vtkMRMLAbstr for (int displayNodeIndex = 0; displayNodeIndex < numberOfDisplayNodes; displayNodeIndex++) { vtkMRMLDisplayNode* segmentationDisplayNode = segmentationNode->GetNthDisplayNode(displayNodeIndex); - if (segmentationDisplayNode->IsDisplayableInView(viewNodeID)) + if (segmentationDisplayNode && segmentationDisplayNode->IsDisplayableInView(viewNodeID)) { return true; }