summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
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 2487f4d..812f922 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4102,12 +4102,14 @@ const char* cmMakefile::GetProperty(const std::string& prop) const
return output.c_str();
}
- return this->StateSnapshot.GetDirectory().GetProperty(prop);
+ cmProp retVal = this->StateSnapshot.GetDirectory().GetProperty(prop);
+ return retVal ? retVal->c_str() : nullptr;
}
const char* cmMakefile::GetProperty(const std::string& prop, bool chain) const
{
- return this->StateSnapshot.GetDirectory().GetProperty(prop, chain);
+ cmProp retVal = this->StateSnapshot.GetDirectory().GetProperty(prop, chain);
+ return retVal ? retVal->c_str() : nullptr;
}
bool cmMakefile::GetPropertyAsBool(const std::string& prop) const