Fix crash on session loading

Amends 22da0f2fd6.

Fixes: QTCREATORBUG-28700
Change-Id: I2d9c249fe03abfa1bc3ce53d0d7cff7b8a0329d6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Christian Kandeler
2023-01-18 10:38:43 +01:00
parent 46e660c646
commit 263c5e6b7c

View File

@@ -74,7 +74,7 @@ void ResourceHandler::updateResourcesHelper(bool updateProjectResources)
m_form->setDirty(true); m_form->setDirty(true);
// Does the file belong to a project? // Does the file belong to a project?
if (project) { if (project && project->rootProjectNode()) {
// Collect project resource files. // Collect project resource files.
// Find the (sub-)project the file belongs to. We don't want to find resources // Find the (sub-)project the file belongs to. We don't want to find resources