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 69ccf37 commit bcf81df2b1def9ccd99b4f9d6a312cbd24dd455c
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/fu-engine.c
@@ -797,7 +797,8 @@ fu_engine_check_requirement_firmware (FuEngine *self, AsRequire *req,
}

/* vendor ID */
if (g_strcmp0 (as_require_get_value (req), "vendor-id") == 0) {
if (g_strcmp0 (as_require_get_value (req), "vendor-id") == 0 &&
fu_device_get_vendor_id (device) != NULL) {
const gchar *version = fu_device_get_vendor_id (device);
if (!as_require_version_compare (req, version, &error_local)) {
if (as_require_get_compare (req) == AS_REQUIRE_COMPARE_GE) {

0 comments on commit bcf81df

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