Skip to content

Commit

Permalink
Only check the vendor ID if the device has one set
Browse files Browse the repository at this point in the history
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 10, 2019
1 parent fee61eb commit 004a062
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fu-engine.c
Expand Up @@ -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) {
Expand Down

0 comments on commit 004a062

Please sign in to comment.