Throw ArgumentNullException on Unix calling Marshal.IsComObject(null) (#12348)
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)
src/mscorlib/src/System/Runtime/InteropServices/NonPortable.cs

index c79af8b459f28577314557a6688070e9d7bb4e23..59229ed52816a22a63c811ec61bf1397cfd32c4c 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;
         }