From: Bernhard Übelacker bernhardu@mailbox.org
This is to avoid a crash in UnregisterDeviceNotification when called a second time for the same handle.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58050 --- dlls/joy.cpl/dinput.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/joy.cpl/dinput.c b/dlls/joy.cpl/dinput.c index 8eefbbbe3f3..340e8d164ae 100644 --- a/dlls/joy.cpl/dinput.c +++ b/dlls/joy.cpl/dinput.c @@ -807,6 +807,7 @@ INT_PTR CALLBACK test_di_dialog_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM case PSN_RESET: case PSN_KILLACTIVE: UnregisterDeviceNotification( devnotify ); + devnotify = NULL; SetEvent( thread_stop ); /* wait for the input thread to stop, processing any WM_USER message from it */ while (MsgWaitForMultipleObjects( 1, &thread, FALSE, INFINITE, QS_ALLINPUT ) == 1)