Author: zoltan Date: 2008-02-20 12:21:42 -0500 (Wed, 20 Feb 2008) New Revision: 96274
Modified: trunk/mcs/class/corlib/System.Runtime.InteropServices/ChangeLog trunk/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs Log: 2008-02-20 Zoltan Varga <[EMAIL PROTECTED]> * Marshal.cs (GetDelegateForFunctionPointer): Add a nullref check. Modified: trunk/mcs/class/corlib/System.Runtime.InteropServices/ChangeLog =================================================================== --- trunk/mcs/class/corlib/System.Runtime.InteropServices/ChangeLog 2008-02-20 17:10:23 UTC (rev 96273) +++ trunk/mcs/class/corlib/System.Runtime.InteropServices/ChangeLog 2008-02-20 17:21:42 UTC (rev 96274) @@ -1,3 +1,7 @@ +2008-02-20 Zoltan Varga <[EMAIL PROTECTED]> + + * Marshal.cs (GetDelegateForFunctionPointer): Add a nullref check. + 2008-02-03 Sebastien Pouliot <[EMAIL PROTECTED]> * COMException.cs: Fix new-line literal and use of "" detected by Modified: trunk/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs =================================================================== --- trunk/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs 2008-02-20 17:10:23 UTC (rev 96273) +++ trunk/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs 2008-02-20 17:21:42 UTC (rev 96274) @@ -1140,6 +1140,8 @@ public static Delegate GetDelegateForFunctionPointer (IntPtr ptr, Type t) { + if (t == null) + throw new ArgumentNullException ("t"); if (!t.IsSubclassOf (typeof (MulticastDelegate)) || (t == typeof (MulticastDelegate))) throw new ArgumentException ("Type is not a delegate", "t"); if (ptr == IntPtr.Zero) _______________________________________________ Mono-patches maillist - Mono-patches@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-patches