Skip to content

Commit

Permalink
Merge pull request #9477 from shuffle2/asan
Browse files Browse the repository at this point in the history
windows: fix unregistering VEH
  • Loading branch information
leoetlino committed Jan 27, 2021
2 parents 305faa7 + a02a629 commit bb121dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/Core/Core/MemTools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ static LONG NTAPI Handler(PEXCEPTION_POINTERS pPtrs)

void InstallExceptionHandler()
{
if (s_veh_handle)
return;

ASSERT(!s_veh_handle);
s_veh_handle = AddVectoredExceptionHandler(TRUE, Handler);
ASSERT(s_veh_handle);
}
Expand All @@ -98,6 +96,8 @@ void UninstallExceptionHandler()
{
ULONG status = RemoveVectoredExceptionHandler(s_veh_handle);
ASSERT(status);
if (status)
s_veh_handle = nullptr;
}

#elif defined(__APPLE__) && !defined(USE_SIGACTION_ON_APPLE)
Expand Down

0 comments on commit bb121dc

Please sign in to comment.