From 51a84aaa57b59c3068df395ce036cafa7b8dc414 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Fri, 5 May 2006 21:45:26 -0400 Subject: ENH: handle empty variables --- Source/cmCommandArgumentParserHelper.cxx | 4 ++++ 1 file changed, 4 insertions(+) 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); -- cgit v0.12