trivial: Fix critical warning when using fwupdtool export-hwids

This commit is contained in:
Richard Hughes 2023-02-14 09:27:11 +00:00 committed by Mario Limonciello
parent c7e79e1e76
commit 2bf53c3cce

View File

@ -1998,6 +1998,8 @@ fu_util_export_hwids(FuUtilPrivate *priv, gchar **values, GError **error)
for (guint i = 0; i < hwid_keys->len; i++) { for (guint i = 0; i < hwid_keys->len; i++) {
const gchar *hwid_key = g_ptr_array_index(hwid_keys, i); const gchar *hwid_key = g_ptr_array_index(hwid_keys, i);
const gchar *value = fu_hwids_get_value(hwids, hwid_key); const gchar *value = fu_hwids_get_value(hwids, hwid_key);
if (value == NULL)
continue;
g_key_file_set_string(kf, "HwIds", hwid_key, value); g_key_file_set_string(kf, "HwIds", hwid_key, value);
} }