Author: jbevain
Date: 2007-07-01 13:18:34 -0400 (Sun, 01 Jul 2007)
New Revision: 81147

Modified:
   trunk/cecil/lib/Mono.Cecil/AggressiveReflectionReader.cs
Log:
do not crash if the custom attribute parent is not valid

Modified: trunk/cecil/lib/Mono.Cecil/AggressiveReflectionReader.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil/AggressiveReflectionReader.cs    2007-07-01 
15:11:37 UTC (rev 81146)
+++ trunk/cecil/lib/Mono.Cecil/AggressiveReflectionReader.cs    2007-07-01 
17:18:34 UTC (rev 81147)
@@ -314,6 +314,9 @@
                                } else
                                        cattr = BuildCustomAttribute (ctor, ca);
 
+                               if (caRow.Parent.RID == 0)
+                                       continue;
+
                                ICustomAttributeProvider owner = null;
                                switch (caRow.Parent.TokenType) {
                                case TokenType.Assembly :

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to