ProjectExplorer: Fix crash when setting up run control

Amends 215b284666.

Change-Id: I2d820113153fc1c3326de00f38a5d14d71a501c9
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2020-09-07 14:22:45 +02:00
parent 5299eb5bec
commit cba414d501

View File

@@ -836,10 +836,12 @@ void RunControl::setupFormatter(OutputFormatter *formatter) const
} }
} }
formatter->setLineParsers(parsers); formatter->setLineParsers(parsers);
Utils::FileInProjectFinder fileFinder; if (project()) {
fileFinder.setProjectDirectory(project()->projectDirectory()); Utils::FileInProjectFinder fileFinder;
fileFinder.setProjectFiles(project()->files(Project::AllFiles)); fileFinder.setProjectDirectory(project()->projectDirectory());
formatter->setFileFinder(fileFinder); fileFinder.setProjectFiles(project()->files(Project::AllFiles));
formatter->setFileFinder(fileFinder);
}
} }
Utils::Id RunControl::runMode() const Utils::Id RunControl::runMode() const