Add a null check to the generator target accessor.

This commit is contained in:
Stephen Kelly 2012-10-10 21:29:57 +02:00
parent 1da77bf1ee
commit aa29e64d77
1 changed files with 5 additions and 2 deletions

View File

@ -4061,9 +4061,12 @@ bool cmMakefile::IsAlias(const char *name)
//----------------------------------------------------------------------------
cmGeneratorTarget* cmMakefile::FindGeneratorTargetToUse(const char* name)
{
cmTarget *t = this->FindTargetToUse(name);
if (cmTarget *t = this->FindTargetToUse(name))
{
return this->LocalGenerator->GetGlobalGenerator()->GetGeneratorTarget(t);
}
return 0;
}
//----------------------------------------------------------------------------
bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg,