diff options
Diffstat (limited to 'Source/cmCLocaleEnvironmentScope.cxx')
-rw-r--r-- | Source/cmCLocaleEnvironmentScope.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmCLocaleEnvironmentScope.cxx b/Source/cmCLocaleEnvironmentScope.cxx index a19dbae..e4c74ec 100644 --- a/Source/cmCLocaleEnvironmentScope.cxx +++ b/Source/cmCLocaleEnvironmentScope.cxx @@ -31,8 +31,9 @@ cmCLocaleEnvironmentScope::cmCLocaleEnvironmentScope() std::string cmCLocaleEnvironmentScope::GetEnv(std::string const& key) { - const char* value = cmSystemTools::GetEnv(key); - return value ? value : std::string(); + std::string value; + cmSystemTools::GetEnv(key, value); + return value; } void cmCLocaleEnvironmentScope::SetEnv(std::string const& key, |