trivial: fu-engine: fix an assertion when system has no product ID

This commit is contained in:
Mario Limonciello 2020-01-15 09:58:53 -06:00 committed by Mario Limonciello
parent 6b8c261225
commit 8ad4ac0de3

View File

@ -4675,8 +4675,10 @@ fu_engine_get_tainted (FuEngine *self)
const gchar * const gchar *
fu_engine_get_host_product (FuEngine *self) fu_engine_get_host_product (FuEngine *self)
{ {
const gchar *result = NULL;
g_return_val_if_fail (FU_IS_ENGINE (self), NULL); g_return_val_if_fail (FU_IS_ENGINE (self), NULL);
return fu_hwids_get_value (self->hwids, FU_HWIDS_KEY_PRODUCT_NAME); result = fu_hwids_get_value (self->hwids, FU_HWIDS_KEY_PRODUCT_NAME);
return result != NULL ? result : "Unknown Product";
} }
const gchar * const gchar *