Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJb Evain <jbevain@gmail.com>2011-04-18 17:47:33 +0400
committerJb Evain <jbevain@gmail.com>2011-04-18 17:47:53 +0400
commit09fa1df3b0a3f4d2c60f7ea49a74c351764967c3 (patch)
treeb9c2402674edf97ee95e997bc39079dd1fc4b565 /mcs/class/corlib/System/Delegate.cs
parentca36867e07c4a102e12cfd811d08323145a37d29 (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.cs2
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];