summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-02-08 15:46:42 (GMT)
committerBrad King <brad.king@kitware.com>2016-02-08 15:46:42 (GMT)
commit656bf0da2c0b9a2fa6e79970df968d5e9c4e4e1a (patch)
tree92372b68cedf092fedb04593a406faacf7d180e9 /Source
parent2a768f84e3dda1ce26342b9922b7f57e5110e887 (diff)
parenta1ad098dc8fc5204fc797b92faed517337816b82 (diff)
downloadCMake-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.cxx8
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)
{