Commit fdb764b2 authored by Christian Kandeler's avatar Christian Kandeler

QbsProjectManager: Fix crash on Kit update

Before accessing qbs::Project methods, we need to check whether this
object is valid.

Change-Id: I6c54f5b1118a3960b4814af647d81f5786fa452d
Reviewed-by: Joerg Bornemann's avatarJoerg Bornemann <>
parent 5088bed3
......@@ -270,7 +270,7 @@ QString QbsRunConfiguration::baseWorkingDirectory() const
void QbsRunConfiguration::addToBaseEnvironment(Utils::Environment &env) const
QbsProject *project = static_cast<QbsProject *>(target()->project());
if (project) {
if (project && project->qbsProject().isValid()) {
const qbs::ProductData product = findProduct(project->qbsProjectData(), m_uniqueProductName);
if (product.isValid()) {
QProcessEnvironment procEnv = env.toProcessEnvironment();
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