Explorar o código

ENH: Handle non-existing variables

Andy Cedilnik %!s(int64=20) %!d(string=hai) anos
pai
achega
6037d1ae66
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Source/cmCommandArgumentParserHelper.cxx

+ 1 - 1
Source/cmCommandArgumentParserHelper.cxx

@@ -99,7 +99,7 @@ char* cmCommandArgumentParserHelper::ExpandVariable(const char* var)
     return this->AddString(ostr.str().c_str());
     } 
   const char* value = m_Makefile->GetDefinition(var);
-  if (m_EscapeQuotes)
+  if (m_EscapeQuotes && value)
     {
     return this->AddString(cmSystemTools::EscapeQuotes(value).c_str());
     }