diff --git a/src/src/Interaction/ActorDraggableInteractorStyle.cpp b/src/src/Interaction/ActorDraggableInteractorStyle.cpp index 4950f9b..45d1446 100644 --- a/src/src/Interaction/ActorDraggableInteractorStyle.cpp +++ b/src/src/Interaction/ActorDraggableInteractorStyle.cpp @@ -354,6 +354,7 @@ void ActorDraggableInteractorStyle::UnActiveMeasure() { if (this->measure) { this->measure->onTerminate(this->Interactor); this->measure->ForceDelete(); + this->measure = nullptr; } this->EndMeasure(); this->measure = nullptr; diff --git a/src/src/Rendering/Viewer/DICOMImageViewer.cxx b/src/src/Rendering/Viewer/DICOMImageViewer.cxx index 5b4e61e..74f16fc 100644 --- a/src/src/Rendering/Viewer/DICOMImageViewer.cxx +++ b/src/src/Rendering/Viewer/DICOMImageViewer.cxx @@ -1153,6 +1153,7 @@ void DICOMImageViewer::ClearCurrentSliceMeasure() const { } void DICOMImageViewer::AddMeasures(vtkObject *, unsigned long eventid, void *calldata) { + if (!calldata) return ; auto m = static_cast(calldata); if (m->Valid()) { measureStore->Store(SERIES_UID, this->SliceIJK, this->ImageMapper->GetSliceNumber(), m);