mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
windows: fix unregistering VEH
This commit is contained in:
parent
305faa73ec
commit
a02a629958
@ -87,9 +87,7 @@ static LONG NTAPI Handler(PEXCEPTION_POINTERS pPtrs)
|
|||||||
|
|
||||||
void InstallExceptionHandler()
|
void InstallExceptionHandler()
|
||||||
{
|
{
|
||||||
if (s_veh_handle)
|
ASSERT(!s_veh_handle);
|
||||||
return;
|
|
||||||
|
|
||||||
s_veh_handle = AddVectoredExceptionHandler(TRUE, Handler);
|
s_veh_handle = AddVectoredExceptionHandler(TRUE, Handler);
|
||||||
ASSERT(s_veh_handle);
|
ASSERT(s_veh_handle);
|
||||||
}
|
}
|
||||||
@ -98,6 +96,8 @@ void UninstallExceptionHandler()
|
|||||||
{
|
{
|
||||||
ULONG status = RemoveVectoredExceptionHandler(s_veh_handle);
|
ULONG status = RemoveVectoredExceptionHandler(s_veh_handle);
|
||||||
ASSERT(status);
|
ASSERT(status);
|
||||||
|
if (status)
|
||||||
|
s_veh_handle = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(__APPLE__) && !defined(USE_SIGACTION_ON_APPLE)
|
#elif defined(__APPLE__) && !defined(USE_SIGACTION_ON_APPLE)
|
||||||
|
Loading…
Reference in New Issue
Block a user