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 <christian.stenger@qt.io>
This commit is contained in:
Filippo Cucchetto
2016-08-03 23:54:56 +02:00
parent 20db17e4f0
commit 3c1c37f1cb

View File

@@ -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;
}