2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
authorRodrigo Kumpera <kumpera@gmail.com>
Thu, 10 Sep 2009 21:07:41 +0000 (21:07 -0000)
committerRodrigo Kumpera <kumpera@gmail.com>
Thu, 10 Sep 2009 21:07:41 +0000 (21:07 -0000)
object.c (mono_delegate_ctor_with_method): Guard against null method.

svn path=/trunk/mono/; revision=141699

mono/metadata/ChangeLog
mono/metadata/object.c

index b0fb6ebd1ddb11f1a60f4ee0d9d5c39ba9b37976..b36a6f31a7949b92d9737a7717e8b9d181f4ccd1 100644 (file)
@@ -4,6 +4,10 @@
        the runtime coreclr tests (without an infinite recursion when
        throwing an exception).
 
+2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       object.c (mono_delegate_ctor_with_method): Guard against null method.
+
 2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>
 
        * marshal.c (mono_marshal_get_xappdomain_dispatch): Add an assert
index e0b30b70ed1d84e4bd24401ba2a4d4d233b03dc6..54183842e9eef4fe5dc39c21d24ed0396bcb17ea 100644 (file)
@@ -5356,7 +5356,7 @@ mono_delegate_ctor_with_method (MonoObject *this, MonoObject *target, gpointer a
                method = mono_marshal_get_remoting_invoke (method);
                delegate->method_ptr = mono_compile_method (method);
                MONO_OBJECT_SETREF (delegate, target, target);
-       } else if (mono_method_signature (method)->hasthis && method->klass->valuetype) {
+       } else if (method && mono_method_signature (method)->hasthis && method->klass->valuetype) {
                method = mono_marshal_get_unbox_wrapper (method);
                delegate->method_ptr = mono_compile_method (method);
                MONO_OBJECT_SETREF (delegate, target, target);