diff options
author | Brad King <brad.king@kitware.com> | 2013-11-22 13:41:03 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-11-22 13:41:03 (GMT) |
commit | a6080587aa9a581021ae6d463b17cda295bc1966 (patch) | |
tree | fea5452c5133ef398585ef6799c76998be76e2ff /Source/cmMakefile.cxx | |
parent | 3013a118269a854fb5b7ef078c778099b991dd7d (diff) | |
parent | aa29e64d77504a50cb8fe6ef5c7d2642170ea07f (diff) | |
download | CMake-a6080587aa9a581021ae6d463b17cda295bc1966.zip CMake-a6080587aa9a581021ae6d463b17cda295bc1966.tar.gz CMake-a6080587aa9a581021ae6d463b17cda295bc1966.tar.bz2 |
Merge topic 'use-generator-target'
aa29e64 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 e073f76..989aa5f 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4086,8 +4086,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; } //---------------------------------------------------------------------------- |