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 d4a6570 commit 02ee914cf395421f458dec58a3ddf5c9c1cbd101
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/fu-engine.c
@@ -802,7 +802,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 02ee914

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