Skip to content

Commit

Permalink
Merge commit 'd5baa14e684167fabdd980ee16d307994398f912'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mirroring committed Oct 22, 2024
2 parents 9c52987 + d5baa14 commit ab1c0fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -807,17 +807,19 @@ internal static unsafe void ConvertContentsToNative(ICustomMarshaler marshaler,
// COMPAT: We never pass null to MarshalManagedToNative.
if (pManagedHome is null)
{
*pNativeHome = IntPtr.Zero;
return;
}

*pNativeHome = marshaler.MarshalManagedToNative(pManagedHome);
}

internal static void ConvertContentsToManaged(ICustomMarshaler marshaler, ref object pManagedHome, IntPtr* pNativeHome)
internal static void ConvertContentsToManaged(ICustomMarshaler marshaler, ref object? pManagedHome, IntPtr* pNativeHome)
{
// COMPAT: We never pass null to MarshalNativeToManaged.
if (*pNativeHome == IntPtr.Zero)
{
pManagedHome = null;
return;
}

Expand Down

0 comments on commit ab1c0fb

Please sign in to comment.