summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-06-26 14:58:16 (GMT)
committerBrad King <brad.king@kitware.com>2008-06-26 14:58:16 (GMT)
commit2ca9a70fd1812ebcf48b07642b73b4e227cd628b (patch)
tree45e7cb62c49e84b5f0105b80d112240deb86efe7 /Source/cmMakefile.cxx
parentbb7bc28c783f529a85a90a41aad98917e45e9dd9 (diff)
downloadCMake-2ca9a70fd1812ebcf48b07642b73b4e227cd628b.zip
CMake-2ca9a70fd1812ebcf48b07642b73b4e227cd628b.tar.gz
CMake-2ca9a70fd1812ebcf48b07642b73b4e227cd628b.tar.bz2
BUG: Fix PARENT_DIRECTORY property in top-level to not crash.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index b822aff..b02e2c8 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2908,8 +2908,10 @@ const char *cmMakefile::GetProperty(const char* prop,
output = "";
if (!strcmp("PARENT_DIRECTORY",prop))
{
- output = this->LocalGenerator->GetParent()
- ->GetMakefile()->GetStartDirectory();
+ if(cmLocalGenerator* plg = this->LocalGenerator->GetParent())
+ {
+ output = plg->GetMakefile()->GetStartDirectory();
+ }
return output.c_str();
}
else if (!strcmp("INCLUDE_REGULAR_EXPRESSION",prop) )