summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/vm/prestub.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vm/prestub.cpp b/src/vm/prestub.cpp
index 5c08bec..c068893 100644
--- a/src/vm/prestub.cpp
+++ b/src/vm/prestub.cpp
@@ -2356,7 +2356,11 @@ EXTERN_C PCODE STDCALL ExternalMethodFixupWorker(TransitionBlock * pTransitionBl
DispatchToken token;
if (pMT->IsInterface() || MethodTable::VTableIndir_t::isRelative)
{
- token = pMT->GetLoaderAllocator()->GetDispatchToken(pMT->GetTypeID(), slot);
+ if (pMT->IsInterface())
+ token = pMT->GetLoaderAllocator()->GetDispatchToken(pMT->GetTypeID(), slot);
+ else
+ token = DispatchToken::CreateDispatchToken(slot);
+
StubCallSite callSite(pIndirection, pEMFrame->GetReturnAddress());
pCode = pMgr->ResolveWorker(&callSite, protectedObj, token, VirtualCallStubManager::SK_LOOKUP);
}