trivial: device-list: Correct a minor logic error

If one of the child devices has gone away, this potentially will
cause the daemon to segfault while accessing it.
This commit is contained in:
Mario Limonciello 2018-09-24 14:06:56 -05:00 committed by Mario Limonciello
parent 7c10696690
commit ccd5fd0088

View File

@ -386,7 +386,7 @@ fu_device_list_remove (FuDeviceList *self, FuDevice *device)
FuDeviceItem *child_item = fu_device_list_find_by_id (self,
fu_device_get_id (child),
NULL);
if (item == NULL) {
if (child_item == NULL) {
g_debug ("device %s not found", fu_device_get_id (child));
continue;
}