diff options
author | Brad King <brad.king@kitware.com> | 2016-02-08 15:46:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-02-08 15:46:42 (GMT) |
commit | 656bf0da2c0b9a2fa6e79970df968d5e9c4e4e1a (patch) | |
tree | 92372b68cedf092fedb04593a406faacf7d180e9 /Source | |
parent | 2a768f84e3dda1ce26342b9922b7f57e5110e887 (diff) | |
parent | a1ad098dc8fc5204fc797b92faed517337816b82 (diff) | |
download | CMake-656bf0da2c0b9a2fa6e79970df968d5e9c4e4e1a.zip CMake-656bf0da2c0b9a2fa6e79970df968d5e9c4e4e1a.tar.gz CMake-656bf0da2c0b9a2fa6e79970df968d5e9c4e4e1a.tar.bz2 |
Merge branch 'fix-install-EXPORT-crash' into release
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmInstallCommand.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 15a83ee..2d78a41 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -1374,10 +1374,12 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args) tei != exportSet->GetTargetExports()->end(); ++tei) { cmTargetExport const* te = *tei; - cmTarget* tgt = this->Makefile->FindTarget(te->TargetName); + cmTarget* tgt = + this->Makefile->GetGlobalGenerator()->FindTarget(te->TargetName); const bool newCMP0022Behavior = - tgt->GetPolicyStatusCMP0022() != cmPolicies::WARN - && tgt->GetPolicyStatusCMP0022() != cmPolicies::OLD; + (tgt && + tgt->GetPolicyStatusCMP0022() != cmPolicies::WARN && + tgt->GetPolicyStatusCMP0022() != cmPolicies::OLD); if(!newCMP0022Behavior) { |