Fix seg fault for empty ENV{} call bug #9747
This commit is contained in:
parent
7130628312
commit
2f94a2c919
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue