summaryrefslogtreecommitdiffstats
path: root/Source/cmState.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r--Source/cmState.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 9fc7615..1e2d83e 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -625,7 +625,8 @@ const char* cmState::GetGlobalProperty(const std::string& prop)
}
#undef STRING_LIST_ELEMENT
- return this->GlobalProperties.GetPropertyValue(prop);
+ cmProp retVal = this->GlobalProperties.GetPropertyValue(prop);
+ return retVal ? retVal->c_str() : nullptr;
}
bool cmState::GetGlobalPropertyAsBool(const std::string& prop)