summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrédéric Danis <frederic.danis@collabora.com>2023-01-11 09:52:41 +0100
committerRichard Hughes <richard@hughsie.com>2023-01-11 09:09:20 +0000
commit600c703532c9019cb2e67878610f169b17e7577b (patch)
treead90efa864f6f62159e7f371c6dcc29cd6065fc2
parent0ce28191bacf54c525a4dffca92c50fa154e7233 (diff)
downloadgusb-600c703532c9019cb2e67878610f169b17e7577b.tar.gz
Fix g_usb_interface_finalize without endpoints
-rw-r--r--gusb/gusb-interface.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gusb/gusb-interface.c b/gusb/gusb-interface.c
index e08409c..414b1fc 100644
--- a/gusb/gusb-interface.c
+++ b/gusb/gusb-interface.c
@@ -40,7 +40,8 @@ g_usb_interface_finalize(GObject *object)
GUsbInterface *self = G_USB_INTERFACE(object);
g_bytes_unref(self->extra);
- g_ptr_array_unref(self->endpoints);
+ if (self->endpoints != NULL)
+ g_ptr_array_unref(self->endpoints);
G_OBJECT_CLASS(g_usb_interface_parent_class)->finalize(object);
}