From 0b8e61cfe53d9d1f697b1d9d85c948ca27c29898 Mon Sep 17 00:00:00 2001 From: tbaudier Date: Fri, 2 Dec 2016 10:37:12 +0100 Subject: [PATCH] Debug Rigid Registration tool cancel A segmentation fault occured after a click on Cancel during image selection --- vv/vvToolRigidReg.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vv/vvToolRigidReg.cxx b/vv/vvToolRigidReg.cxx index 8c2909e..e50ab7f 100644 --- a/vv/vvToolRigidReg.cxx +++ b/vv/vvToolRigidReg.cxx @@ -178,7 +178,8 @@ bool vvToolRigidReg::close() msgBox.addButton(tr("Yes"), QMessageBox::AcceptRole); msgBox.addButton(tr("No"), QMessageBox::RejectRole); if (msgBox.exec() == QMessageBox::AcceptRole) { - SetTransform(mInitialMatrix); + if (mCurrentSlicerManager) + SetTransform(mInitialMatrix); return vvToolWidgetBase::close(); } return false; -- 2.47.1