[gnome-software] fwupd: Avoid a critical warning when the device vendor is not set
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] fwupd: Avoid a critical warning when the device vendor is not set
- Date: Mon, 8 Oct 2018 14:04:22 +0000 (UTC)
commit 1855a0235b38169c27e31d5753ccaf014b4e1ee7
Author: Richard Hughes <richard hughsie com>
Date: Mon Oct 8 14:46:45 2018 +0100
fwupd: Avoid a critical warning when the device vendor is not set
plugins/fwupd/gs-fwupd-app.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c
index e911a4a1..982e1951 100644
--- a/plugins/fwupd/gs-fwupd-app.c
+++ b/plugins/fwupd/gs-fwupd-app.c
@@ -98,7 +98,8 @@ gs_fwupd_app_set_from_device (GsApp *app, FwupdDevice *dev)
}
if (fwupd_device_get_name (dev) != NULL) {
g_autofree gchar *vendor_name = NULL;
- if (g_str_has_prefix (fwupd_device_get_name (dev),
+ if (fwupd_device_get_vendor (dev) == NULL ||
+ g_str_has_prefix (fwupd_device_get_name (dev),
fwupd_device_get_vendor (dev))) {
vendor_name = g_strdup (fwupd_device_get_name (dev));
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]