Commit 3c1c37f1 authored by Filippo Cucchetto's avatar Filippo Cucchetto

Nim: Removed wrong asserts triggered during restore of buildsteps

During the restore phase the project buildsteps could be null.
So during the checks if the project already contains a build/clean
step we should handle the null case.

Change-Id: I6a2bb66fc9c12004ab4fff6be4da4c44dec9c063
Task-number: QTCREATORBUG-16687
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
parent 20db17e4
......@@ -106,14 +106,12 @@ bool NimBuildConfiguration::canRestore(const QVariantMap &map)
bool NimBuildConfiguration::hasNimCompilerBuildStep() const
{
BuildStepList *steps = stepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
QTC_ASSERT(steps, return false);
return steps->contains(Constants::C_NIMCOMPILERBUILDSTEP_ID);
return steps ? steps->contains(Constants::C_NIMCOMPILERBUILDSTEP_ID) : false;
}
bool NimBuildConfiguration::hasNimCompilerCleanStep() const
{
BuildStepList *steps = stepList(ProjectExplorer::Constants::BUILDSTEPS_CLEAN);
QTC_ASSERT(steps, return false);
return steps ? steps->contains(Constants::C_NIMCOMPILERCLEANSTEP_ID) : false;
}
......
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