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.
This commit is contained in:
Brad King 2013-03-12 17:25:59 -04:00
parent 92a2ab70b6
commit ab079ee682
1 changed files with 4 additions and 0 deletions

View File

@ -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;