Commit 43c04ac8 authored by Tobias Hunger's avatar Tobias Hunger

BuildSteps: Fix a number of crashes

Fix crashes due to activeProjectConfigurationChanged signal sending
a nullptr.

Uses the same fix as QTCREATORBUG-18865, but in more places:-)

Task-number: QTCREATORBUG-18866
Change-Id: Ic71af5ed26b2a44339f0c687f3f46bfdf62c2489
Reviewed-by: Tim Jenssen's avatarTim Jenssen <tim.jenssen@qt.io>
parent a9aac73e
......@@ -242,7 +242,7 @@ MakeStepConfigWidget::MakeStepConfigWidget(MakeStep *makeStep) :
});
connect(makeStep->project(), &Project::activeProjectConfigurationChanged,
this, [this](ProjectConfiguration *pc) {
if (pc->isActive())
if (pc && pc->isActive())
updateDetails();
});
}
......
......@@ -258,7 +258,7 @@ GenericMakeStepConfigWidget::GenericMakeStepConfigWidget(GenericMakeStep *makeSt
});
connect(pro, &Project::activeProjectConfigurationChanged,
this, [this](ProjectConfiguration *pc) {
if (pc->isActive()) {
if (pc && pc->isActive()) {
updateMakeOverrideLabel();
updateDetails();
}
......
......@@ -266,7 +266,7 @@ IosBuildStepConfigWidget::IosBuildStepConfigWidget(IosBuildStep *buildStep)
});
connect(pro, &Project::activeProjectConfigurationChanged,
this, [this](ProjectConfiguration *pc) {
if (pc->isActive())
if (pc && pc->isActive())
updateDetails();
});
}
......
......@@ -266,7 +266,7 @@ IosPresetBuildStepConfigWidget::IosPresetBuildStepConfigWidget(IosPresetBuildSte
});
connect(pro, &Project::activeProjectConfigurationChanged,
this, [this](ProjectConfiguration *pc) {
if (pc->isActive())
if (pc && pc->isActive())
updateDetails();
});
}
......
......@@ -146,7 +146,7 @@ QbsProject::QbsProject(const FileName &fileName) :
});
connect(this, &Project::activeProjectConfigurationChanged,
this, [this](ProjectConfiguration *pc) {
if (pc->isActive())
if (pc && pc->isActive())
startParsing();
});
......
......@@ -104,7 +104,7 @@ QmakeProjectConfigWidget::QmakeProjectConfigWidget(QmakeBuildConfiguration *bc)
});
connect(project, &Project::activeProjectConfigurationChanged,
this, [this](ProjectConfiguration *pc) {
if (pc->isActive())
if (pc && pc->isActive())
environmentChanged();
});
connect(project, &QmakeProject::buildDirectoryInitialized,
......
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