summaryrefslogtreecommitdiff
path: root/Source/cmSourceFile.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmSourceFile.cxx')
-rw-r--r--Source/cmSourceFile.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index fd9cacdbfe..5dc8b05aaa 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -361,7 +361,7 @@ const char* cmSourceFile::GetProperty(const std::string& prop) const
return output.c_str();
}
- const char* retVal = this->Properties.GetPropertyValue(prop);
+ cmProp retVal = this->Properties.GetPropertyValue(prop);
if (!retVal) {
cmMakefile const* mf = this->Location.GetMakefile();
const bool chain =
@@ -369,9 +369,10 @@ const char* cmSourceFile::GetProperty(const std::string& prop) const
if (chain) {
return mf->GetProperty(prop, chain);
}
+ return nullptr;
}
- return retVal;
+ return retVal->c_str();
}
const char* cmSourceFile::GetSafeProperty(const std::string& prop) const