From: Hugh Bellamy Date: Sat, 17 Jun 2017 10:49:26 +0000 (+0700) Subject: Throw ArgumentNullException on Unix calling Marshal.IsComObject(null) (dotnet/coreclr... X-Git-Tag: submit/tizen/20210909.063632~11030^2~6925^2~400 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3fe743359bea26900fbf6cd07873abc523941d1e;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Throw ArgumentNullException on Unix calling Marshal.IsComObject(null) (dotnet/coreclr#12348) Commit migrated from https://github.com/dotnet/coreclr/commit/a6ed71c6472c8ea0f680507ae34f56aeaf6bb3d2 --- diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/NonPortable.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/NonPortable.cs index c79af8b..59229ed 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/NonPortable.cs +++ b/src/coreclr/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; }