winebus.sys: Don't do anything in iohid_driver_unload if iohid was not initialized.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2019-09-27 12:37:48 +02:00 committed by Alexandre Julliard
parent ef59d2d11f
commit 485aed9f1c
1 changed files with 4 additions and 0 deletions

View File

@ -416,6 +416,10 @@ NTSTATUS iohid_driver_init(void)
void iohid_driver_unload( void )
{
TRACE("Unloading Driver\n");
if (!run_loop_handle)
return;
IOHIDManagerUnscheduleFromRunLoop(hid_manager, run_loop, kCFRunLoopDefaultMode);
CFRunLoopStop(run_loop);
WaitForSingleObject(run_loop_handle, INFINITE);