From b31c408c87453712f1f23bc4ef3d25a22c359fa3 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Mon, 5 Dec 2016 15:51:44 +0100 Subject: [PATCH] ProjectExplorer: Check before setting errorMessage Change-Id: Ic9437c3527f4f26bf72c5f7d18fdbde1217f4dd4 Reviewed-by: Tim Jenssen --- src/plugins/projectexplorer/jsonwizard/jsonkitspage.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/projectexplorer/jsonwizard/jsonkitspage.cpp b/src/plugins/projectexplorer/jsonwizard/jsonkitspage.cpp index 4275f6db5dd..d08996809f6 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonkitspage.cpp +++ b/src/plugins/projectexplorer/jsonwizard/jsonkitspage.cpp @@ -164,8 +164,10 @@ QVector JsonKitsPage::parseFeatures(const QVar const QVariantMap obj = element.toMap(); const QString feature = obj.value(QLatin1String(KEY_FEATURE)).toString(); if (feature.isEmpty()) { - *errorMessage = tr("No \"%1\" key found in feature list object.") - .arg(QLatin1String(KEY_FEATURE)); + if (errorMessage) { + *errorMessage = tr("No \"%1\" key found in feature list object.") + .arg(QLatin1String(KEY_FEATURE)); + } return QVector(); }