diff options
Diffstat (limited to 'thirdparty')
-rw-r--r-- | thirdparty/mhook/mhook-lib/mhook.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/thirdparty/mhook/mhook-lib/mhook.cpp b/thirdparty/mhook/mhook-lib/mhook.cpp index 7249ad5d..9bf0e70e 100644 --- a/thirdparty/mhook/mhook-lib/mhook.cpp +++ b/thirdparty/mhook/mhook-lib/mhook.cpp @@ -187,7 +187,9 @@ static VOID ListRemove(MHOOKS_TRAMPOLINE** pListHead, MHOOKS_TRAMPOLINE* pNode) if ((*pListHead) == pNode) { (*pListHead) = pNode->pNextTrampoline; - assert((*pListHead)->pPrevTrampoline == NULL); + if (*pListHead != NULL) { + assert((*pListHead)->pPrevTrampoline == NULL); + } } pNode->pPrevTrampoline = NULL; @@ -445,7 +447,7 @@ static MHOOKS_TRAMPOLINE* TrampolineGet(PBYTE pHookedFunction) { MHOOKS_TRAMPOLINE* pCurrent = g_pHooks; while (pCurrent) { - if (pCurrent->pHookFunction == pHookedFunction) { + if ((PBYTE)&(pCurrent->codeTrampoline) == pHookedFunction) { return pCurrent; } |