summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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) )