Skip to content

Commit 9c3349c

Browse files
FIX: Fix SelectionObserver crash when active node ID is unset and accessed
1 parent f7a16cb commit 9c3349c

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

LayerDM/MRML/vtkMRMLLayerDMSelectionObserver.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void vtkMRMLLayerDMSelectionObserver::StopPlace() const
122122

123123
std::string vtkMRMLLayerDMSelectionObserver::GetActivePlaceNodeID() const
124124
{
125-
if (!this->m_selectionNode)
125+
if (!this->m_selectionNode || !this->m_selectionNode->GetActivePlaceNodeID())
126126
{
127127
return "";
128128
}

LayerDM/Testing/Cxx/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ endforeach()
3535
target_link_libraries(
3636
${KIT}CxxTests
3737
${MODULE_TARGET_LIBRARIES}
38+
vtkSlicerMarkupsModuleMRML
3839
)
3940

4041
include(SlicerMacroSimpleTest)

0 commit comments

Comments
 (0)