summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index ac8381c..360b3d9 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4061,8 +4061,11 @@ bool cmMakefile::IsAlias(const char *name)
//----------------------------------------------------------------------------
cmGeneratorTarget* cmMakefile::FindGeneratorTargetToUse(const char* name)
{
- cmTarget *t = this->FindTargetToUse(name);
- return this->LocalGenerator->GetGlobalGenerator()->GetGeneratorTarget(t);
+ if (cmTarget *t = this->FindTargetToUse(name))
+ {
+ return this->LocalGenerator->GetGlobalGenerator()->GetGeneratorTarget(t);
+ }
+ return 0;
}
//----------------------------------------------------------------------------