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(),