colorhug: Never set a NULL version when the FW inface data is NULL

This fixes updating from ColorHug(1) devices on old firmware versions,
but doesn't affect ColorHug2.
This commit is contained in:
Richard Hughes 2022-05-11 10:27:26 +01:00
parent 53e3ae340b
commit a826f0134a

View File

@ -371,8 +371,10 @@ fu_colorhug_device_setup(FuDevice *device, GError **error)
/* although guessing is a route to insanity, if the device has
* provided the extra data it's because the BCD type was not
* suitable -- and INTEL_ME is not relevant here */
fu_device_set_version_format(device, fu_common_version_guess_format(tmp));
fu_device_set_version(device, tmp);
if (tmp != NULL) {
fu_device_set_version_format(device, fu_common_version_guess_format(tmp));
fu_device_set_version(device, tmp);
}
}
/* get GUID from the descriptor if set */