From 2bf53c3cce3405e98a245d5e2c73a8cef1e2e2da Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Tue, 14 Feb 2023 09:27:11 +0000 Subject: [PATCH] trivial: Fix critical warning when using fwupdtool export-hwids --- src/fu-tool.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/fu-tool.c b/src/fu-tool.c index 31532edfb..acbcfe1be 100644 --- a/src/fu-tool.c +++ b/src/fu-tool.c @@ -1998,6 +1998,8 @@ fu_util_export_hwids(FuUtilPrivate *priv, gchar **values, GError **error) for (guint i = 0; i < hwid_keys->len; i++) { const gchar *hwid_key = g_ptr_array_index(hwid_keys, i); const gchar *value = fu_hwids_get_value(hwids, hwid_key); + if (value == NULL) + continue; g_key_file_set_string(kf, "HwIds", hwid_key, value); }