Skip to content

Commit 5ea30ca

Browse files
andyvorldDJm00n
authored andcommitted
fix nullptr access on hid_hotplug_deregister_callback
(cherry picked from commit b864213)
1 parent 053256c commit 5ea30ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

windows/hid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ int HID_API_EXPORT HID_API_CALL hid_hotplug_deregister_callback(hid_hotplug_call
988988

989989
/* Remove this notification */
990990
for (struct hid_hotplug_callback **current = &hid_hotplug_context.hotplug_cbs; *current; current = &(*current)->next) {
991-
if (hotplug_cb->handle == callback_handle) {
991+
if ((*current)->handle == callback_handle) {
992992
struct hid_hotplug_callback *next = (*current)->next;
993993
hotplug_cb = *current;
994994
*current = next;

0 commit comments

Comments
 (0)