mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-14 07:09:57 +00:00
trivial: Fall back to the HSI ID if the name is not available
This fixes a crash if you 'ninja install' with a newer fwupd version and then run fwupdtool from an older version.
This commit is contained in:
parent
fb0a938f6c
commit
4d2c0f8047
@ -1240,6 +1240,9 @@ fu_common_strwidth (const gchar *text)
|
||||
{
|
||||
const gchar *p = text;
|
||||
gsize width = 0;
|
||||
|
||||
g_return_val_if_fail (text != NULL, 0);
|
||||
|
||||
while (*p) {
|
||||
gunichar c = g_utf8_get_char (p);
|
||||
if (g_unichar_iswide (c))
|
||||
|
@ -1557,6 +1557,8 @@ static void
|
||||
fu_security_attr_append_str (FwupdSecurityAttr *attr, GString *str)
|
||||
{
|
||||
g_autofree gchar *name = fu_security_attr_get_name (attr);
|
||||
if (name == NULL)
|
||||
name = g_strdup (fwupd_security_attr_get_appstream_id (attr));
|
||||
if (fwupd_security_attr_has_flag (attr, FWUPD_SECURITY_ATTR_FLAG_OBSOLETED)) {
|
||||
g_string_append (str, "✦ ");
|
||||
} else if (fwupd_security_attr_has_flag (attr, FWUPD_SECURITY_ATTR_FLAG_SUCCESS)) {
|
||||
|
Loading…
Reference in New Issue
Block a user