AutoTest: Silence soft assert

We synchronize the test tools now earlier and may
not have finished setting up the configuration of
the current project.
This means the project might have no valid target
yet.
Amends 481070d808.

Change-Id: Ic0c1817318a343e68587930c492397a6094a4ce2
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2021-09-15 06:55:27 +02:00
parent 2c5672a3c7
commit 0f58258e04

View File

@@ -407,7 +407,7 @@ void TestTreeModel::synchronizeTestTools()
if (project) {
const QList<Target *> &allTargets = project->targets();
auto target = allTargets.empty() ? nullptr : allTargets.first();
if (QTC_GUARD(target)) {
if (target) {
auto bs = target->buildSystem();
for (ITestTool *testTool : newlyAdded) {
ITestTreeItem *rootNode = testTool->rootNode();