Commit 61552f87 authored by Tobias Hunger's avatar Tobias Hunger

Qbs: Fix crash when handling files not belonging to a project

Change-Id: I8631ac0677205412306cb26a85b5b04e6f82fdd2
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent f5d77071
......@@ -237,7 +237,8 @@ void QbsProjectManagerPlugin::updateBuildActions()
fileEnabled = !m_projectExplorer->buildManager()->isBuilding(project)
&& m_currentProject && !m_currentProject->isParsing();
if (QbsProductNode *productNode = qobject_cast<QbsProductNode *>(node->projectNode())) {
if (QbsProductNode *productNode
= qobject_cast<QbsProductNode *>(node ? node->projectNode() : 0)) {
productEnabled = true;
productVisible = true;
m_buildProduct->setParameter(productNode->displayName());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment