forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user