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:
Alexander Neundorf 2008-01-18 17:11:50 -05:00
parent c0bb73787d
commit 52b96e5bd9
1 changed files with 2 additions and 2 deletions

View File

@ -2999,8 +2999,8 @@ void cmMakefile::RaiseScope(const char *var, const char *varDef)
this->DefinitionStack[this->DefinitionStack.size()-2].erase(var);
}
}
// otherwise do the parent
else
// otherwise do the parent (if one exists)
else if (this->LocalGenerator->GetParent())
{
cmMakefile *parent = this->LocalGenerator->GetParent()->GetMakefile();
if (parent)