projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca36867
)
Fix DynamicInvoke when the delegate is closed over null
author
Jb Evain
<jbevain@gmail.com>
Mon, 18 Apr 2011 13:47:33 +0000
(15:47 +0200)
committer
Jb Evain
<jbevain@gmail.com>
Mon, 18 Apr 2011 13:47:53 +0000
(15:47 +0200)
mcs/class/corlib/System/Delegate.cs
patch
|
blob
|
history
diff --git
a/mcs/class/corlib/System/Delegate.cs
b/mcs/class/corlib/System/Delegate.cs
index bd71c46e487aa31bf4f2324940b3594fb060356c..d36aa03100b8157db925c3858b6a43ce30dac9be 100644
(file)
--- 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];