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 5651594..6c27a7d 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -142,7 +142,8 @@ const char* cmState::GetCacheEntryValue(std::string const& key) const
const char* cmState::GetInitializedCacheValue(std::string const& key) const
{
- return this->CacheManager->GetInitializedCacheValue(key);
+ const std::string* p = this->CacheManager->GetInitializedCacheValue(key);
+ return p ? p->c_str() : nullptr;
}
cmStateEnums::CacheEntryType cmState::GetCacheEntryType(