From 35fa65ec969e83a6e318c70a766c376fc8e40027 Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 24 Feb 2016 20:59:04 +0100 Subject: [PATCH] + fix possible crash in parameter editor --- src/Gui/DlgParameterImp.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Gui/DlgParameterImp.cpp b/src/Gui/DlgParameterImp.cpp index 6914bae4a..ea7f85f24 100644 --- a/src/Gui/DlgParameterImp.cpp +++ b/src/Gui/DlgParameterImp.cpp @@ -265,10 +265,9 @@ void DlgParameterImp::onChangeParameterSet(int index) hGrp = hGrp->GetGroup("ParameterEditor"); QString path = QString::fromUtf8(hGrp->GetASCII("LastParameterGroup").c_str()); QStringList paths = path.split(QLatin1String("."), QString::SkipEmptyParts); - if (paths.empty()) - return; + QTreeWidgetItem* parent = 0; - for (int index=0; index < paramGroup->topLevelItemCount(); index++) { + for (int index=0; index < paramGroup->topLevelItemCount() && !paths.empty(); index++) { QTreeWidgetItem* child = paramGroup->topLevelItem(index); if (child->text(0) == paths.front()) { paths.pop_front();