summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 8b51690..93c168a 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1779,8 +1779,11 @@ const char* cmTarget::GetProperty(const std::string& prop) const
const bool chain =
impl->Makefile->GetState()->IsPropertyChained(prop, cmProperty::TARGET);
if (chain) {
- return impl->Makefile->GetStateSnapshot().GetDirectory().GetProperty(
+ retVal = impl->Makefile->GetStateSnapshot().GetDirectory().GetProperty(
prop, chain);
+ if (retVal) {
+ return retVal->c_str();
+ }
}
return nullptr;
}