From bffde3a7ae834139793d8c00f73986879146b0e0 Mon Sep 17 00:00:00 2001 From: tbaudier Date: Mon, 4 Mar 2019 16:49:12 +0100 Subject: [PATCH] Better control to avoid segfault With one input, the accept function is called 3 times instead of 2 (I do not know why) It leads to a segfault in mListOfSimpleInputWidget[3] so to avoid it I added a check --- vv/vvToolInputSelectorWidget.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vv/vvToolInputSelectorWidget.cxx b/vv/vvToolInputSelectorWidget.cxx index 82110f0..ca1ed29 100644 --- a/vv/vvToolInputSelectorWidget.cxx +++ b/vv/vvToolInputSelectorWidget.cxx @@ -90,7 +90,7 @@ void vvToolInputSelectorWidget::accept() if (mNumberOfAcceptedInputs == GetNumberOfInput()) { setEnabled(false); emit accepted(); - } else { + } else if (mNumberOfAcceptedInputs < GetNumberOfInput()) { mListOfSimpleInputWidget[mNumberOfAcceptedInputs]->setEnabled(true); } } -- 2.47.1