[gnome-bluetooth/wip/hadess/fix-keyboard-cancel: 10/10] settings-widget: Print the object path in debug if name is not set
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/wip/hadess/fix-keyboard-cancel: 10/10] settings-widget: Print the object path in debug if name is not set
- Date: Fri, 19 Feb 2021 12:10:43 +0000 (UTC)
commit 92997846a2d1b51b8c63749bad6d8f83cd0a755f
Author: Bastien Nocera <hadess hadess net>
Date: Fri Feb 19 12:58:41 2021 +0100
settings-widget: Print the object path in debug if name is not set
lib/bluetooth-settings-widget.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/lib/bluetooth-settings-widget.c b/lib/bluetooth-settings-widget.c
index c81ff22c..ae649d7b 100644
--- a/lib/bluetooth-settings-widget.c
+++ b/lib/bluetooth-settings-widget.c
@@ -1778,11 +1778,10 @@ device_removed_cb (BluetoothClient *client,
path = g_object_get_data (G_OBJECT (l->data), "object-path");
if (g_str_equal (path, object_path)) {
- char *name;
+ g_autofree char *name = NULL;
g_object_get (G_OBJECT (l->data), "name", &name, NULL);
- g_debug ("Removing device '%s'", name);
- g_free (name);
+ g_debug ("Removing device '%s'", name ? name : object_path);
gtk_widget_destroy (GTK_WIDGET (l->data));
found = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]