summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmCommandArgumentParserHelper.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx
index ace67ec..234c37e 100644
--- a/Source/cmCommandArgumentParserHelper.cxx
+++ b/Source/cmCommandArgumentParserHelper.cxx
@@ -65,7 +65,11 @@ char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key,
if ( !key )
{
return this->ExpandVariable(var);
- }
+ }
+ if(!var)
+ {
+ return this->EmptyVariable;
+ }
if ( strcmp(key, "ENV") == 0 )
{
char *ptr = getenv(var);