diff options
author | Alexander Neundorf <neundorf@kde.org> | 2008-01-18 22:11:50 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2008-01-18 22:11:50 (GMT) |
commit | 52b96e5bd9d4b6abf2213fd6c77b8ab61480f922 (patch) | |
tree | 094dbc2bea861949c42e5f8ebc39e498956dc56c | |
parent | c0bb73787d548d7e39ec49fbc7d038099c3a73f6 (diff) | |
download | CMake-52b96e5bd9d4b6abf2213fd6c77b8ab61480f922.zip CMake-52b96e5bd9d4b6abf2213fd6c77b8ab61480f922.tar.gz CMake-52b96e5bd9d4b6abf2213fd6c77b8ab61480f922.tar.bz2 |
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
-rw-r--r-- | Source/cmMakefile.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 5d2464f..6e99c17 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -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) |