diff options
author | Jb Evain <jbevain@gmail.com> | 2011-04-18 17:47:33 +0400 |
---|---|---|
committer | Jb Evain <jbevain@gmail.com> | 2011-04-18 17:47:53 +0400 |
commit | 09fa1df3b0a3f4d2c60f7ea49a74c351764967c3 (patch) | |
tree | b9c2402674edf97ee95e997bc39079dd1fc4b565 /mcs/class/corlib/System/Delegate.cs | |
parent | ca36867e07c4a102e12cfd811d08323145a37d29 (diff) |
Fix DynamicInvoke when the delegate is closed over null
Diffstat (limited to 'mcs/class/corlib/System/Delegate.cs')
-rw-r--r-- | mcs/class/corlib/System/Delegate.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mcs/class/corlib/System/Delegate.cs b/mcs/class/corlib/System/Delegate.cs index bd71c46e487..d36aa03100b 100644 --- a/mcs/class/corlib/System/Delegate.cs +++ b/mcs/class/corlib/System/Delegate.cs @@ -392,7 +392,7 @@ namespace System method_info = m_target.GetType ().GetMethod (data.method_name, mtypes); } - if ((m_target != null) && Method.IsStatic) { + if (Method.IsStatic && (args != null ? args.Length : 0) == Method.GetParameters ().Length - 1) { // The delegate is bound to m_target if (args != null) { object[] newArgs = new object [args.Length + 1]; |