From a6ed71c6472c8ea0f680507ae34f56aeaf6bb3d2 Mon Sep 17 00:00:00 2001 From: Hugh Bellamy Date: Sat, 17 Jun 2017 17:49:26 +0700 Subject: [PATCH] Throw ArgumentNullException on Unix calling Marshal.IsComObject(null) (#12348) --- .../src/System/Runtime/InteropServices/NonPortable.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mscorlib/src/System/Runtime/InteropServices/NonPortable.cs b/src/mscorlib/src/System/Runtime/InteropServices/NonPortable.cs index c79af8b459..59229ed528 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/NonPortable.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/NonPortable.cs @@ -153,7 +153,12 @@ namespace System.Runtime.InteropServices } public static bool IsComObject(object o) - { + { + if (o == null) + { + throw new ArgumentNullException(nameof(o)); + } + return false; } -- 2.34.1