From c56304614508f37e8069727ebd3bc7d4c8e7d55a Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 13 May 2020 17:22:13 +0200 Subject: [PATCH] ProjectExplorer: Fix possible crash in RunControl There is not necessarily a run configuration. Change-Id: I53e0a0ab322bcf1cbac2cbb6944602aeed933432 Reviewed-by: Nikolai Kosjar --- src/plugins/projectexplorer/runcontrol.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/runcontrol.cpp b/src/plugins/projectexplorer/runcontrol.cpp index 29b98c945c6..a545b972de7 100644 --- a/src/plugins/projectexplorer/runcontrol.cpp +++ b/src/plugins/projectexplorer/runcontrol.cpp @@ -827,7 +827,8 @@ void RunControlPrivate::showError(const QString &msg) QList RunControl::createOutputParsers() const { QList parsers = OutputFormatterFactory::createFormatters(target()); - if (const auto customParsersAspect = runConfiguration()->aspect()) { + if (const auto customParsersAspect + = (runConfiguration() ? runConfiguration()->aspect() : nullptr)) { for (const Core::Id id : customParsersAspect->parsers()) { if (CustomParser * const parser = CustomParser::createFromId(id)) parsers << parser;