BUG: don't crash if cmMakefile::RaiseScope() is called from a cmake file in
the top level directory in normal code (i.e. not within a function) Alex
This commit is contained in:
parent
c0bb73787d
commit
52b96e5bd9
|
@ -2999,8 +2999,8 @@ void cmMakefile::RaiseScope(const char *var, const char *varDef)
|
||||||
this->DefinitionStack[this->DefinitionStack.size()-2].erase(var);
|
this->DefinitionStack[this->DefinitionStack.size()-2].erase(var);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// otherwise do the parent
|
// otherwise do the parent (if one exists)
|
||||||
else
|
else if (this->LocalGenerator->GetParent())
|
||||||
{
|
{
|
||||||
cmMakefile *parent = this->LocalGenerator->GetParent()->GetMakefile();
|
cmMakefile *parent = this->LocalGenerator->GetParent()->GetMakefile();
|
||||||
if (parent)
|
if (parent)
|
||||||
|
|
Loading…
Reference in New Issue