diff options
author | Stephen Kelly <steveire@gmail.com> | 2012-10-10 19:29:57 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-11-21 12:21:43 (GMT) |
commit | aa29e64d77504a50cb8fe6ef5c7d2642170ea07f (patch) | |
tree | 33c10ef7ec3ed2d0967c3514fcf06dc93e54de9f /Source/cmMakefile.cxx | |
parent | 1da77bf1ee4f3ba315ebb00da2eaeac474614cad (diff) | |
download | CMake-aa29e64d77504a50cb8fe6ef5c7d2642170ea07f.zip CMake-aa29e64d77504a50cb8fe6ef5c7d2642170ea07f.tar.gz CMake-aa29e64d77504a50cb8fe6ef5c7d2642170ea07f.tar.bz2 |
Add a null check to the generator target accessor.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 7 |
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; } //---------------------------------------------------------------------------- |