Skip to content

Commit 0f1a005

Browse files
committed
more
1 parent a543ec0 commit 0f1a005

File tree

1 file changed

+2
-1
lines changed
  • src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices

1 file changed

+2
-1
lines changed

src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1139,10 +1139,11 @@ public static TDelegate GetDelegateForFunctionPointer<TDelegate>(IntPtr ptr)
11391139
[EditorBrowsable(EditorBrowsableState.Never)]
11401140
public static IntPtr GetFunctionPointerForDelegate(Delegate d)
11411141
{
1142+
ArgumentNullException.ThrowIfNull(d);
1143+
11421144
#if TARGET_BROWSER || TARGET_WASI
11431145
if (OperatingSystem.IsWasi() || OperatingSystem.IsBrowser()) throw new PlatformNotSupportedException(SR.PlatformNotSupported_DynamicEntrypoint);
11441146
#endif
1145-
ArgumentNullException.ThrowIfNull(d);
11461147

11471148
return GetFunctionPointerForDelegateInternal(d);
11481149
}

0 commit comments

Comments
 (0)