From ccf189d50573f1977cca9a5f5958e2cb6c48787a Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Thu, 10 Mar 2011 14:35:31 +0100 Subject: [PATCH] Fix NullReferenceException when an interface method named 'Invoke' is called. --- ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs b/ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs index d1972056d..53c0d3457 100644 --- a/ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs +++ b/ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs @@ -598,7 +598,7 @@ namespace ICSharpCode.Decompiler.Ast }; } } - } else if (cecilMethodDef.Name == "Invoke" && cecilMethodDef.DeclaringType.BaseType.FullName == "System.MulticastDelegate") { + } else if (cecilMethodDef.Name == "Invoke" && cecilMethodDef.DeclaringType.BaseType != null && cecilMethodDef.DeclaringType.BaseType.FullName == "System.MulticastDelegate") { AdjustArgumentsForMethodCall(cecilMethod, methodArgs); return target.Invoke(methodArgs); }