diff options
author | Brad King <brad.king@kitware.com> | 2013-03-12 21:25:59 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-03-12 21:25:59 (GMT) |
commit | ab079ee6822c4ab151b0df8f9a529088607d3629 (patch) | |
tree | 7193fd32e719449eda8ae77b7fcfed14d9e7e46b | |
parent | 92a2ab70b61f978e96c8a6eaae0cce1c7422a59f (diff) | |
download | CMake-ab079ee6822c4ab151b0df8f9a529088607d3629.zip CMake-ab079ee6822c4ab151b0df8f9a529088607d3629.tar.gz CMake-ab079ee6822c4ab151b0df8f9a529088607d3629.tar.bz2 |
Avoid crash when checking property compatibility without link info
Teach the compatibility check added by commit 042ecf04 (Add API to
calculate link-interface-dependent bool properties or error, 2013-01-06)
to return early if no link information is available. This avoids
crashing in a case that should fail with an error message.
-rw-r--r-- | Source/cmTarget.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index c8f532e..07da31f 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -4699,6 +4699,10 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget *tgt, || (!impliedByUse && !explicitlySet)); cmComputeLinkInformation *info = tgt->GetLinkInformation(config); + if(!info) + { + return propContent; + } const cmComputeLinkInformation::ItemVector &deps = info->GetItems(); bool propInitialized = explicitlySet; |