From: Aaron Robinson Date: Wed, 21 Nov 2018 19:07:41 +0000 (-0800) Subject: Check for null on COM to CLR call if error occurs during thread instance get. X-Git-Tag: submit/tizen/20210909.063632~11030^2~3275^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=802114fe6ddf9ee0ac1505c68f111b163673c3c3;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Check for null on COM to CLR call if error occurs during thread instance get. Commit migrated from https://github.com/dotnet/coreclr/commit/fac2d42c8c1546c87317675728e048961004a2ee --- diff --git a/src/coreclr/src/vm/comtoclrcall.cpp b/src/coreclr/src/vm/comtoclrcall.cpp index 5c275f0..d257326 100644 --- a/src/coreclr/src/vm/comtoclrcall.cpp +++ b/src/coreclr/src/vm/comtoclrcall.cpp @@ -782,7 +782,7 @@ extern "C" UINT64 __stdcall COMToCLRWorker(Thread *pThread, ComMethodFrame* pFra #ifndef _TARGET_X86_ ErrorExit: - if (pThread->PreemptiveGCDisabled()) + if (pThread != nullptr && pThread->PreemptiveGCDisabled()) pThread->EnablePreemptiveGC(); // The call failed so we need to report an error to the caller.