From e528f91c6cc11d03efdcca27149d2abaf4d089a5 Mon Sep 17 00:00:00 2001 From: Fadi Hanna Date: Mon, 15 Apr 2019 16:25:16 -0700 Subject: [PATCH] Check for null methodhandle before checking if the method is in the same version bubble (dotnet/coreclr#23940) Commit migrated from https://github.com/dotnet/coreclr/commit/ee41ee41bcf5f6c1d77a261fa7cae469475b268a --- src/coreclr/src/zap/zapinfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/src/zap/zapinfo.cpp b/src/coreclr/src/zap/zapinfo.cpp index 066eb39..21ce5f5 100644 --- a/src/coreclr/src/zap/zapinfo.cpp +++ b/src/coreclr/src/zap/zapinfo.cpp @@ -3864,7 +3864,7 @@ BOOL ZapInfo::pInvokeMarshalingRequired(CORINFO_METHOD_HANDLE method, return TRUE; #endif - if (IsReadyToRunCompilation() && !m_pImage->GetCompileInfo()->IsInCurrentVersionBubble(m_pEEJitInfo->getMethodModule(method))) + if (IsReadyToRunCompilation() && method != NULL && !m_pImage->GetCompileInfo()->IsInCurrentVersionBubble(m_pEEJitInfo->getMethodModule(method))) { // FUTURE: ZapSig::EncodeMethod does not yet handle cross module references for ReadyToRun // See zapsig.cpp around line 1217. -- 2.7.4