From acadee710e00cca55736db864263bdcdcbac31a6 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Fri, 7 Aug 2020 15:26:51 +0200 Subject: [PATCH] ProjectExplorer: Do not pass invalid regex to match Change-Id: I9917c9fa7a79132c253269efde90976e18f9b805 Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/customparserconfigdialog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/customparserconfigdialog.cpp b/src/plugins/projectexplorer/customparserconfigdialog.cpp index 5584ae480af..f67cd25b9d9 100644 --- a/src/plugins/projectexplorer/customparserconfigdialog.cpp +++ b/src/plugins/projectexplorer/customparserconfigdialog.cpp @@ -278,7 +278,8 @@ bool CustomParserConfigDialog::checkPattern(QLineEdit *pattern, const QString &o pattern->setPalette(palette); pattern->setToolTip(rx.isValid() ? QString() : rx.errorString()); - *match = rx.match(outputText); + if (rx.isValid()) + *match = rx.match(outputText); if (rx.pattern().isEmpty() || !rx.isValid() || !match->hasMatch()) { *errorMessage = QString::fromLatin1("%2 ").arg( Utils::creatorTheme()->color(Utils::Theme::TextColorError).name(),