[gnome-bluetooth/wip/hadess/empty-icons] lib: Handle empty Icon property strings
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/wip/hadess/empty-icons] lib: Handle empty Icon property strings
- Date: Mon, 17 Jan 2022 14:38:03 +0000 (UTC)
commit 0e0159371b33e55a39d8ea0a4d49d48324e7c80e
Author: Bastien Nocera <hadess hadess net>
Date: Mon Jan 17 15:37:44 2022 +0100
lib: Handle empty Icon property strings
lib/bluetooth-client.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index f8cc1317..ab035cda 100644
--- a/lib/bluetooth-client.c
+++ b/lib/bluetooth-client.c
@@ -227,8 +227,11 @@ device_resolve_type_and_icon (Device1 *device, BluetoothType *type, const char *
*icon = icon_override (device1_get_address (device), *type);
- if (!*icon)
+ if (!*icon) {
*icon = device1_get_icon (device);
+ if (*icon && *icon[0] == '\0')
+ *icon = NULL;
+ }
if (!*icon)
*icon = "bluetooth";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]