summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2008-01-18 22:11:50 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2008-01-18 22:11:50 (GMT)
commit52b96e5bd9d4b6abf2213fd6c77b8ab61480f922 (patch)
tree094dbc2bea861949c42e5f8ebc39e498956dc56c
parentc0bb73787d548d7e39ec49fbc7d038099c3a73f6 (diff)
downloadCMake-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.cxx4
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)