summaryrefslogtreecommitdiffstats
path: root/Source/cmGetPropertyCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGetPropertyCommand.cxx')
-rw-r--r--Source/cmGetPropertyCommand.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx
index 9623514..1d8f0a9 100644
--- a/Source/cmGetPropertyCommand.cxx
+++ b/Source/cmGetPropertyCommand.cxx
@@ -241,8 +241,9 @@ bool HandleGlobalMode(cmExecutionStatus& status, const std::string& name,
// Get the property.
cmake* cm = status.GetMakefile().GetCMakeInstance();
+ cmProp p = cm->GetState()->GetGlobalProperty(propertyName);
return StoreResult(infoType, status.GetMakefile(), variable,
- cm->GetState()->GetGlobalProperty(propertyName));
+ p ? p->c_str() : nullptr);
}
bool HandleDirectoryMode(cmExecutionStatus& status, const std::string& name,