aboutsummaryrefslogtreecommitdiff
path: root/lib/libusb/libusb10_hotplug.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libusb/libusb10_hotplug.c')
-rw-r--r--lib/libusb/libusb10_hotplug.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libusb/libusb10_hotplug.c b/lib/libusb/libusb10_hotplug.c
index 9c46d4926bfa..359c818b5720 100644
--- a/lib/libusb/libusb10_hotplug.c
+++ b/lib/libusb/libusb10_hotplug.c
@@ -430,5 +430,7 @@ libusb_hotplug_get_user_data(struct libusb_context *ctx,
}
HOTPLUG_UNLOCK(ctx);
- return (handle);
+ if (handle != NULL)
+ return (handle->user_data);
+ return (NULL);
}