summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmLocalGenerator.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index edb644d..169cdf4 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2384,11 +2384,12 @@ const char* cmLocalGenerator::GetFeature(const std::string& feature,
{
return value;
}
- if(cmLocalGenerator* parent = this->GetParent())
+ cmLocalGenerator* parent = this->GetParent();
+ if(!parent)
{
- return parent->GetFeature(feature, config);
+ return 0;
}
- return 0;
+ return parent->GetFeature(feature, config);
}
//----------------------------------------------------------------------------