diff options
-rw-r--r-- | src/vm/memberload.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vm/memberload.cpp b/src/vm/memberload.cpp index 4bd663a47b..7ea16108e4 100644 --- a/src/vm/memberload.cpp +++ b/src/vm/memberload.cpp @@ -1103,6 +1103,7 @@ MemberLoader::FindMethod( for (; it.IsValid(); it.Prev()) { MethodDesc *pCurDeclMD = it.GetDeclMethodDesc(); + LPCUTF8 pCurDeclMDName = NULL; #ifdef _DEBUG MethodTable *pCurDeclMT = pCurDeclMD->GetMethodTable(); CONSISTENCY_CHECK(!pMT->IsInterface() || pCurDeclMT == pMT->GetCanonicalMethodTable()); @@ -1117,7 +1118,8 @@ MemberLoader::FindMethod( || (pCurDeclMD->MightHaveName(targetNameHash) // This is done last since it is the most expensive of the IF statement. - && StrCompFunc(pszName, pCurDeclMD->GetName()) == 0) + && (pCurDeclMDName = pCurDeclMD->GetName()) != NULL + && StrCompFunc(pszName, pCurDeclMDName) == 0) ) { if (CompareMethodSigWithCorrectSubstitution(pSignature, cSignature, pModule, pCurDeclMD, pDefSubst, pMT)) |