[gnome-bluetooth] settings: Simply bail out when the name isn't known
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth] settings: Simply bail out when the name isn't known
- Date: Mon, 9 Dec 2013 17:39:43 +0000 (UTC)
commit 347e9cf8b851119f05b0cd37f950a4d413137688
Author: Bastien Nocera <hadess hadess net>
Date: Mon Dec 9 16:05:58 2013 +0100
settings: Simply bail out when the name isn't known
If we get a pairing request and we don't even have a name for
the device, just bail.
lib/bluetooth-settings-widget.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/lib/bluetooth-settings-widget.c b/lib/bluetooth-settings-widget.c
index 3eba850..728a763 100644
--- a/lib/bluetooth-settings-widget.c
+++ b/lib/bluetooth-settings-widget.c
@@ -244,6 +244,10 @@ get_properties_for_device (BluetoothSettingsWidget *self,
g_return_val_if_fail (name != NULL, FALSE);
value = g_dbus_proxy_get_cached_property (device, "Name");
+ if (value == NULL) {
+ /* What?! */
+ return FALSE;
+ }
*name = g_variant_dup_string (value, NULL);
g_variant_unref (value);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]