user32: Fix NULL dereference in UnregisterDeviceNotification.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49211 Signed-off-by: Arkadiusz Hiler <arek@hiler.eu> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8091922d9a
commit
65e550d265
|
@ -2109,6 +2109,9 @@ BOOL WINAPI I_ScUnregisterDeviceNotification( HDEVNOTIFY handle )
|
|||
|
||||
TRACE("%p\n", handle);
|
||||
|
||||
if (!handle)
|
||||
return FALSE;
|
||||
|
||||
EnterCriticalSection( &service_cs );
|
||||
list_remove( ®istration->entry );
|
||||
LeaveCriticalSection(&service_cs);
|
||||
|
|
|
@ -3004,6 +3004,12 @@ static void test_GetPointerType(void)
|
|||
ok(type == PT_MOUSE, " type %d\n", type );
|
||||
}
|
||||
|
||||
static void test_UnregisterDeviceNotification(void)
|
||||
{
|
||||
BOOL ret = UnregisterDeviceNotification(NULL);
|
||||
ok(ret == FALSE, "Unregistering NULL Device Notification returned: %d\n", ret);
|
||||
}
|
||||
|
||||
START_TEST(input)
|
||||
{
|
||||
POINT pos;
|
||||
|
@ -3050,4 +3056,6 @@ START_TEST(input)
|
|||
test_GetPointerType();
|
||||
else
|
||||
win_skip("GetPointerType is not available\n");
|
||||
|
||||
test_UnregisterDeviceNotification();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue