From ef59d2d11f5aed1d0bd249e159c672df2c8ccc3d Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Fri, 27 Sep 2019 12:37:44 +0200 Subject: [PATCH] winebus.sys: Don't do anything in udev_driver_unload if udev was not initialized. Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- dlls/winebus.sys/bus_udev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c index b72e6bf47d1..6fa6efb7dce 100644 --- a/dlls/winebus.sys/bus_udev.c +++ b/dlls/winebus.sys/bus_udev.c @@ -1488,6 +1488,9 @@ void udev_driver_unload( void ) { TRACE("Unload Driver\n"); + if (!deviceloop_handle) + return; + write(deviceloop_control[1], "q", 1); WaitForSingleObject(deviceloop_handle, INFINITE); close(deviceloop_control[0]);