diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-05-06 01:45:26 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-05-06 01:45:26 (GMT) |
commit | 51a84aaa57b59c3068df395ce036cafa7b8dc414 (patch) | |
tree | ac8b3c4118d932ee6e8dbc6d10d07148e8d6eb8f /Source | |
parent | bc135b7fc219187b5154e13f3606b64759f269fc (diff) | |
download | CMake-51a84aaa57b59c3068df395ce036cafa7b8dc414.zip CMake-51a84aaa57b59c3068df395ce036cafa7b8dc414.tar.gz CMake-51a84aaa57b59c3068df395ce036cafa7b8dc414.tar.bz2 |
ENH: handle empty variables
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCommandArgumentParserHelper.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index f24cab6..570cc2d 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -91,6 +91,10 @@ char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key, cons char* cmCommandArgumentParserHelper::ExpandVariable(const char* var) { + if(!var) + { + return 0; + } if(this->FileName && strcmp(var, "CMAKE_CURRENT_LIST_FILE") == 0) { return this->AddString(this->FileName); |