diff options
author | Richard Hughes <richard@hughsie.com> | 2021-12-06 14:22:27 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2021-12-07 09:41:03 +0000 |
commit | 24934619a2ad3467b98142dfab2039985afc970d (patch) | |
tree | 435c97f80e651ad93c7a40d864e4d2707fb78905 /gusb | |
parent | 197fc9eb778791665f81b35a3817527cc4f0810c (diff) | |
download | gusb-24934619a2ad3467b98142dfab2039985afc970d.tar.gz |
Fix hotplug after threaded device removal
Somehow this worked when we unref'd the context but did not ref it.
Diffstat (limited to 'gusb')
-rw-r--r-- | gusb/gusb-context.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gusb/gusb-context.c b/gusb/gusb-context.c index 86f6819..f10ad86 100644 --- a/gusb/gusb-context.c +++ b/gusb/gusb-context.c @@ -407,7 +407,7 @@ g_usb_context_hotplug_cb (struct libusb_context *ctx, GUsbContextIdleHelper *helper; helper = g_new0 (GUsbContextIdleHelper, 1); - helper->context = context; + helper->context = g_object_ref (context); helper->dev = libusb_ref_device (dev); helper->event = event; |