summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2021-01-27 15:47:55 +0100
committerGitHub <noreply@github.com>2021-01-27 15:47:55 +0100
commitbb121dc9a5e48dc9806fa00cb2cd3545047621f5 (patch)
tree8f41dc219c285387f5e90bc81d443e483251a681 /Source/Core
parent305faa73ec5c646643db9b8526906480ada7c6fa (diff)
parenta02a62995857cb43e0a10b1dbff170ccecf54a98 (diff)
Merge pull request #9477 from shuffle2/asan
windows: fix unregistering VEH
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/MemTools.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/Core/MemTools.cpp b/Source/Core/Core/MemTools.cpp
index 813a2ef195..7559b1b6bc 100644
--- a/Source/Core/Core/MemTools.cpp
+++ b/Source/Core/Core/MemTools.cpp
@@ -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);
}
@@ -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)