Browse Source

Fix NullReferenceException when an interface method named 'Invoke' is called.

pull/100/head
Daniel Grunwald 15 years ago
parent
commit
ccf189d505
  1. 2
      ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs

2
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); AdjustArgumentsForMethodCall(cecilMethod, methodArgs);
return target.Invoke(methodArgs); return target.Invoke(methodArgs);
} }

Loading…
Cancel
Save