[linker] do not try to iterate thru null array
[mono.git] / mcs / tools / linker / Mono.Linker.Steps / MarkStep.cs
index bd55c8527c6d154f2b16908a6a7d4c3144eb83d9..74c219a82b61bd5811c3b708350b6a85a7c19a92 100644 (file)
@@ -336,6 +336,9 @@ namespace Mono.Linker.Steps {
                                        return;
 
                                MarkType (et);
+                               if (argument.Value == null)
+                                       return;
+
                                foreach (var cac in (CustomAttributeArgument[]) argument.Value)
                                        MarkWithResolvedScope ((TypeReference) cac.Value);
                        } else if (at.Namespace == "System" && at.Name == "Type") {