forked from qt-creator/qt-creator
Qbs: Fix crash when handling files not belonging to a project
Change-Id: I8631ac0677205412306cb26a85b5b04e6f82fdd2 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -237,7 +237,8 @@ void QbsProjectManagerPlugin::updateBuildActions()
|
|||||||
fileEnabled = !m_projectExplorer->buildManager()->isBuilding(project)
|
fileEnabled = !m_projectExplorer->buildManager()->isBuilding(project)
|
||||||
&& m_currentProject && !m_currentProject->isParsing();
|
&& 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;
|
productEnabled = true;
|
||||||
productVisible = true;
|
productVisible = true;
|
||||||
m_buildProduct->setParameter(productNode->displayName());
|
m_buildProduct->setParameter(productNode->displayName());
|
||||||
|
Reference in New Issue
Block a user