diff options
-rw-r--r-- | libnm/nm-device.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libnm/nm-device.c b/libnm/nm-device.c index 3a74c4a60a..6d01ec3b10 100644 --- a/libnm/nm-device.c +++ b/libnm/nm-device.c @@ -1583,12 +1583,15 @@ ensure_description (NMDevice *device) g_clear_pointer (&priv->description, g_free); } - if ( !priv->short_vendor - || !(short_product = nm_utils_fixup_product_string (nm_device_get_product (device)))) { + if (!priv->short_vendor) { priv->description = g_strdup (nm_device_get_iface (device) ?: ""); return; } + short_product = nm_utils_fixup_product_string (nm_device_get_product (device)); + if (short_product == NULL) + short_product = g_strdup (get_type_name (device)); + /* Another quick hack; if all of the fixed up vendor string * is found in product, ignore the vendor. */ |