CppEditor: Catch another project pointer access from a thread

Amends 33108795d6.

Fixes: QTCREATORBUG-27044
Change-Id: I53d716355b0784841fd8d965c8af14fe321c33de
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2022-02-24 13:00:58 +01:00
parent 1172eeb060
commit 86f1864d3c
7 changed files with 21 additions and 10 deletions

View File

@@ -60,8 +60,11 @@ public:
const ProjectPartInfo choose()
{
const Project * const project = projectMap.value(activeProject).get();
const Utils::FilePath projectFilePath = project ? project->projectFilePath()
: Utils::FilePath();
return chooser.choose(filePath, currentProjectPartInfo, preferredProjectPartId,
projectMap.value(activeProject).get(),
projectFilePath,
languagePreference, projectsChanged);
}