Commit c3562e98 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Qbs: Fix crash in QbsRunConfiguration



Change-Id: I975b8b0f9a2c761850d34e1ab26ff343be7a16c7
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@digia.com>
parent 490524b7
...@@ -199,7 +199,7 @@ QString QbsRunConfiguration::executable() const ...@@ -199,7 +199,7 @@ QString QbsRunConfiguration::executable() const
QbsProject *pro = static_cast<QbsProject *>(target()->project()); QbsProject *pro = static_cast<QbsProject *>(target()->project());
const qbs::ProductData *product = findProduct(pro->qbsProjectData(), m_qbsProduct); const qbs::ProductData *product = findProduct(pro->qbsProjectData(), m_qbsProduct);
if (!product) if (!product || !pro->qbsProject())
return QString(); return QString();
return pro->qbsProject()->targetExecutable(*product, installOptions()); return pro->qbsProject()->targetExecutable(*product, installOptions());
...@@ -562,7 +562,7 @@ QList<Core::Id> QbsRunConfigurationFactory::availableCreationIds(ProjectExplorer ...@@ -562,7 +562,7 @@ QList<Core::Id> QbsRunConfigurationFactory::availableCreationIds(ProjectExplorer
return result; return result;
QbsProject *project = static_cast<QbsProject *>(parent->project()); QbsProject *project = static_cast<QbsProject *>(parent->project());
if (!project || !project->qbsProjectData()) if (!project || !project->qbsProjectData() || !project->qbsProject())
return result; return result;
foreach (const qbs::ProductData &product, project->qbsProjectData()->products()) { foreach (const qbs::ProductData &product, project->qbsProjectData()->products()) {
......
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