Skip to content
Permalink
Browse files

Only check the vendor ID if the device has one set

This means we don't get a weird error if the metadata sets a vendor-id, but the
device does not.
  • Loading branch information
hughsie committed Dec 9, 2019
1 parent fee61eb commit 004a0624d05211e8436060bb7af6b0c6f2d805a3
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/fu-engine.c
@@ -1058,7 +1058,8 @@ fu_engine_check_requirement_firmware (FuEngine *self, XbNode *req,
}

/* vendor ID */
if (g_strcmp0 (xb_node_get_text (req), "vendor-id") == 0) {
if (g_strcmp0 (xb_node_get_text (req), "vendor-id") == 0 &&
fu_device_get_vendor_id (device) != NULL) {
const gchar *version = fu_device_get_vendor_id (device);
if (!fu_engine_require_vercmp (req, version, &error_local)) {
if (g_strcmp0 (xb_node_get_attr (req, "compare"), "ge") == 0) {

0 comments on commit 004a062

Please sign in to comment.
You can’t perform that action at this time.