summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index b468208..71359a2 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2679,10 +2679,11 @@ cmake::MessageType cmMakefile::ExpandVariablesInStringNew(
if (this->GetCMakeInstance()->GetWarnUninitialized() &&
!this->VariableInitialized(lookup)) {
if (this->CheckSystemVars ||
- cmSystemTools::IsSubDirectory(filename,
- this->GetHomeDirectory()) ||
- cmSystemTools::IsSubDirectory(
- filename, this->GetHomeOutputDirectory())) {
+ (filename &&
+ (cmSystemTools::IsSubDirectory(filename,
+ this->GetHomeDirectory()) ||
+ cmSystemTools::IsSubDirectory(
+ filename, this->GetHomeOutputDirectory())))) {
std::ostringstream msg;
msg << "uninitialized variable \'" << lookup << "\'";
this->IssueMessage(cmake::AUTHOR_WARNING, msg.str());