Skip to content
Permalink
Browse files

Addendum to previous commit

Fix handle leak
  • Loading branch information...
codenulls committed Jun 27, 2019
1 parent e8ddd2c commit 48878af361c97c840dd267e654f5247b5a513c18
Showing with 3 additions and 2 deletions.
  1. +3 −2 Client/multiplayer_sa/CMultiplayerSA_CrashFixHacks.cpp
@@ -1536,13 +1536,14 @@ void __cdecl OnMY_CAnimManager_CreateAnimAssocGroups_Protect(CAnimBlendAssocGrou
{
if (pGroupInterface->groupID == groupID)
{
void* pIdOffsetMember = reinterpret_cast<void*>(&pGroupInterface->iIDOffset);
HANDLE mainThread = OpenThread(THREAD_ALL_ACCESS, TRUE, SharedUtil::GetMainThreadId());

assert(mainThread != NULL);

void* pIdOffsetMember = reinterpret_cast<void*>(&pGroupInterface->iIDOffset);
SetHardwareBreakpoint(mainThread, HWBRK_TYPE_WRITE, HWBRK_SIZE_4, pIdOffsetMember);

CloseHandle(mainThread);

LogEvent(511, "Breakpoint", "Hardware Breakpoint set on WRITE access",
SString("groupID: %u | pGroupInterface: %#.8x, pIdOffsetMember = %#.8x | iIDOffset: %d", groupID, pGroupInterface, pIdOffsetMember,
pGroupInterface->iIDOffset),

0 comments on commit 48878af

Please sign in to comment.
You can’t perform that action at this time.