forked from qt-creator/qt-creator
ProjectExplorer: Fix possible crash in RunControl
There is not necessarily a run configuration. Change-Id: I53e0a0ab322bcf1cbac2cbb6944602aeed933432 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
committed by
Nikolai Kosjar
parent
cbb70513bf
commit
c563046145
@@ -827,7 +827,8 @@ void RunControlPrivate::showError(const QString &msg)
|
|||||||
QList<Utils::OutputLineParser *> RunControl::createOutputParsers() const
|
QList<Utils::OutputLineParser *> RunControl::createOutputParsers() const
|
||||||
{
|
{
|
||||||
QList<Utils::OutputLineParser *> parsers = OutputFormatterFactory::createFormatters(target());
|
QList<Utils::OutputLineParser *> parsers = OutputFormatterFactory::createFormatters(target());
|
||||||
if (const auto customParsersAspect = runConfiguration()->aspect<CustomParsersAspect>()) {
|
if (const auto customParsersAspect
|
||||||
|
= (runConfiguration() ? runConfiguration()->aspect<CustomParsersAspect>() : nullptr)) {
|
||||||
for (const Core::Id id : customParsersAspect->parsers()) {
|
for (const Core::Id id : customParsersAspect->parsers()) {
|
||||||
if (CustomParser * const parser = CustomParser::createFromId(id))
|
if (CustomParser * const parser = CustomParser::createFromId(id))
|
||||||
parsers << parser;
|
parsers << parser;
|
||||||
|
|||||||
Reference in New Issue
Block a user