summaryrefslogtreecommitdiffstats
path: root/Source/cmSourceFile.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmSourceFile.cxx')
-rw-r--r--Source/cmSourceFile.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index 5dc8b05..ad59cd6 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -367,7 +367,9 @@ const char* cmSourceFile::GetProperty(const std::string& prop) const
const bool chain =
mf->GetState()->IsPropertyChained(prop, cmProperty::SOURCE_FILE);
if (chain) {
- return mf->GetProperty(prop, chain);
+ if (cmProp p = mf->GetProperty(prop, chain)) {
+ return p->c_str();
+ }
}
return nullptr;
}