From 24934619a2ad3467b98142dfab2039985afc970d Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Mon, 6 Dec 2021 14:22:27 +0000 Subject: Fix hotplug after threaded device removal Somehow this worked when we unref'd the context but did not ref it. --- gusb/gusb-context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.1