From 069433e97d4dfa91182e5d95caaec631d0f6fc11 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Tue, 7 May 2019 10:28:45 +0100 Subject: [PATCH] trivial: Copy the icons if unset for the device child --- src/fu-device.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/fu-device.c b/src/fu-device.c index 5b6e03238..272607d04 100644 --- a/src/fu-device.c +++ b/src/fu-device.c @@ -453,6 +453,13 @@ fu_device_add_child (FuDevice *self, FuDevice *child) fu_device_set_vendor (child, fu_device_get_vendor (self)); if (fu_device_get_vendor_id (child) == NULL) fu_device_set_vendor_id (child, fu_device_get_vendor_id (self)); + if (fu_device_get_icons(child)->len == 0) { + GPtrArray *icons = fu_device_get_icons (self); + for (guint i = 0; i < icons->len; i++) { + const gchar *icon_name = g_ptr_array_index (icons, i); + fu_device_add_icon (child, icon_name); + } + } /* ensure the parent is also set on the child */ fu_device_set_parent (child, self);