diff --git a/dynhooks_sourcepawn.cpp b/dynhooks_sourcepawn.cpp index 6c73a07..fd7782e 100644 --- a/dynhooks_sourcepawn.cpp +++ b/dynhooks_sourcepawn.cpp @@ -277,7 +277,7 @@ ReturnAction_t HandleDetour(HookType_t hookType, CHook* pDetour) ke::AutoPtr tempRetBuf(new uint8_t[pDetour->m_pCallingConvention->m_returnType.size]); // Find the this pointer. - if (pWrapper->callConv == CallConv_THISCALL) + if (pWrapper->callConv == CallConv_THISCALL && pWrapper->thisType != ThisPointer_Ignore) { void *thisPtr = pDetour->GetArgument(0); cell_t thisAddr = GetThisPtr(thisPtr, pWrapper->thisType);