[Mono-bugs] [Bug 572459] MCS crashes when trying to compile the following code.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Mar 31 14:09:37 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=572459

http://bugzilla.novell.com/show_bug.cgi?id=572459#c1


Miguel de Icaza <miguel at novell.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |miguel at novell.com
         AssignedTo|mono-bugs at lists.ximian.com  |msafar at novell.com

--- Comment #1 from Miguel de Icaza <miguel at novell.com> 2010-03-31 18:09:36 UTC ---
Marek, this patch seems to fix it, but I am not sure if this is correct:


Index: class.cs
===================================================================
--- class.cs    (revision 154148)
+++ class.cs    (working copy)
@@ -1345,8 +1345,11 @@
             } else if (Kind == MemberKind.Interface) {
                 member_cache = new MemberCache (null, this);
                 Type [] ifaces = TypeManager.GetInterfaces (TypeBuilder);
-                for (int i = 0; i < ifaces.Length; ++i)
-                    member_cache.AddInterface (TypeManager.LookupMemberCache
(ifaces [i]));
+                for (int i = 0; i < ifaces.Length; ++i){
+                    MemberCache ic = TypeManager.LookupMemberCache (ifaces
[i]);
+                    if (ic != null)
+                        member_cache.AddInterface (ic);
+                }
             } else {
                 member_cache = new MemberCache (null, this);
             }

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list