Browse Source

Merge topic 'property-link-depends-no-crash'

ab079ee Avoid crash when checking property compatibility without link info
92a2ab7 Avoid crash when checking property link dependencies without link info
Brad King 13 years ago
parent
commit
9a02a26702
1 changed files with 8 additions and 0 deletions
  1. 8 0
      Source/cmTarget.cxx

+ 8 - 0
Source/cmTarget.cxx

@@ -4753,6 +4753,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;
 
@@ -4893,6 +4897,10 @@ bool isLinkDependentProperty(cmTarget *tgt, const std::string &p,
                              const char *config)
 {
   cmComputeLinkInformation *info = tgt->GetLinkInformation(config);
+  if(!info)
+    {
+    return false;
+    }
 
   const cmComputeLinkInformation::ItemVector &deps = info->GetItems();