diff options
author | Brad King <brad.king@kitware.com> | 2008-06-26 14:58:16 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-06-26 14:58:16 (GMT) |
commit | 2ca9a70fd1812ebcf48b07642b73b4e227cd628b (patch) | |
tree | 45e7cb62c49e84b5f0105b80d112240deb86efe7 | |
parent | bb7bc28c783f529a85a90a41aad98917e45e9dd9 (diff) | |
download | CMake-2ca9a70fd1812ebcf48b07642b73b4e227cd628b.zip CMake-2ca9a70fd1812ebcf48b07642b73b4e227cd628b.tar.gz CMake-2ca9a70fd1812ebcf48b07642b73b4e227cd628b.tar.bz2 |
BUG: Fix PARENT_DIRECTORY property in top-level to not crash.
-rw-r--r-- | Source/cmMakefile.cxx | 6 |
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) ) |