Throw ArgumentNullException on Unix calling Marshal.IsComObject(null) (dotnet/coreclr...
authorHugh Bellamy <hughbellars@gmail.com>
Sat, 17 Jun 2017 10:49:26 +0000 (17:49 +0700)
committerJan Kotas <jkotas@microsoft.com>
Sat, 17 Jun 2017 10:49:26 +0000 (03:49 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/a6ed71c6472c8ea0f680507ae34f56aeaf6bb3d2

src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/NonPortable.cs

index c79af8b..59229ed 100644 (file)
@@ -153,7 +153,12 @@ namespace System.Runtime.InteropServices
         }
 
         public static bool IsComObject(object o)
-        { 
+        {
+            if (o == null)
+            {
+                throw new ArgumentNullException(nameof(o));
+            }
+
             return false;
         }