aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2020-08-07 15:26:51 +0200
committerChristian Stenger <christian.stenger@qt.io>2020-08-10 10:55:33 +0000
commitacadee710e00cca55736db864263bdcdcbac31a6 (patch)
tree825e6a4ae8d97cd73de02dbd8df31e03b15e8ff3
parent63823a55acf2739c77a27a1b56ecf4c5a3f52ad7 (diff)
ProjectExplorer: Do not pass invalid regex to match
Change-Id: I9917c9fa7a79132c253269efde90976e18f9b805 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--src/plugins/projectexplorer/customparserconfigdialog.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/customparserconfigdialog.cpp b/src/plugins/projectexplorer/customparserconfigdialog.cpp
index 5584ae480a..f67cd25b9d 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("<font color=\"%1\">%2 ").arg(
Utils::creatorTheme()->color(Utils::Theme::TextColorError).name(),