trivial: Relax the requirement that fu_firmware_set_bytes() can only be called once

PVS: Expression 'priv->bytes != NULL' is always false.
This commit is contained in:
Richard Hughes 2022-09-09 10:27:53 +01:00
parent 5e3a601da9
commit d88e6b4a1e

View File

@ -519,7 +519,6 @@ fu_firmware_set_bytes(FuFirmware *self, GBytes *bytes)
FuFirmwarePrivate *priv = GET_PRIVATE(self);
g_return_if_fail(FU_IS_FIRMWARE(self));
g_return_if_fail(bytes != NULL);
g_return_if_fail(priv->bytes == NULL);
if (priv->bytes != NULL)
g_bytes_unref(priv->bytes);
priv->bytes = g_bytes_ref(bytes);