Skip to content

Commit eeba06a

Browse files
jamesobutlerlassoan
authored andcommitted
BUG: Fix Slicer crash upon hiding delete all control points option
Slicer would crash with the following: ``` w = slicer.qSlicerMarkupsPlaceWidget() w.deleteAllControlPointsOptionVisible=False ```
1 parent a61c805 commit eeba06a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Modules/Loadable/Markups/Widgets/qSlicerMarkupsPlaceWidget.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,10 @@ void qSlicerMarkupsPlaceWidget::updateDeleteButton()
604604
d->DeleteButton->setPopupMode(showMenu ? QToolButton::MenuButtonPopup : QToolButton::DelayedPopup);
605605

606606
vtkMRMLMarkupsNode* currentMarkupsNode = this->currentMarkupsNode();
607+
if ( currentMarkupsNode == nullptr )
608+
{
609+
return;
610+
}
607611
d->DeleteButton->setVisible(showMenu || !currentMarkupsNode->GetFixedNumberOfControlPoints()); // hide when no options to show
608612
}
609613
}

0 commit comments

Comments
 (0)