CppTools: Fix possible crash when testing

Change-Id: I9ade8c861c44329376c8f1dcc9506561b7689de5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2021-05-12 12:04:13 +02:00
parent c79a4fab6e
commit 32653e1a7b

View File

@@ -234,7 +234,8 @@ bool TestCase::waitUntilProjectIsFullyOpened(Project *project, int timeOutInMs)
return QTest::qWaitFor( return QTest::qWaitFor(
[project]() { [project]() {
return !SessionManager::startupBuildSystem()->isParsing() return SessionManager::startupBuildSystem()
&& !SessionManager::startupBuildSystem()->isParsing()
&& CppModelManager::instance()->projectInfo(project).isValid(); && CppModelManager::instance()->projectInfo(project).isValid();
}, },
timeOutInMs); timeOutInMs);