forked from qt-creator/qt-creator
OutputFormatter factories: Handle the "no target" case
Amends d42920d372
.
Change-Id: I302c4e54cbe2dcc2340deffa99237e909418939d
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -338,7 +338,7 @@ PythonRunConfigurationFactory::PythonRunConfigurationFactory()
|
||||
PythonOutputFormatterFactory::PythonOutputFormatterFactory()
|
||||
{
|
||||
setFormatterCreator([](Target *t) -> OutputLineParser * {
|
||||
if (t->project()->mimeType() == Constants::C_PY_MIMETYPE)
|
||||
if (t && t->project()->mimeType() == Constants::C_PY_MIMETYPE)
|
||||
return new PythonOutputLineParser;
|
||||
return nullptr;
|
||||
});
|
||||
|
@@ -243,7 +243,7 @@ void QtOutputLineParser::updateProjectFileList()
|
||||
QtOutputFormatterFactory::QtOutputFormatterFactory()
|
||||
{
|
||||
setFormatterCreator([](Target *t) -> OutputLineParser * {
|
||||
BaseQtVersion *qt = QtKitAspect::qtVersion(t->kit());
|
||||
BaseQtVersion *qt = QtKitAspect::qtVersion(t ? t->kit() : nullptr);
|
||||
return qt ? new QtOutputLineParser(t) : nullptr;
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user