diff options
-rw-r--r-- | Source/cmCommandArgumentParserHelper.cxx | 6 |
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); |