[gnome-bluetooth/gnome-3-28] client: Fix bluetooth_client_set_trusted() not working
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/gnome-3-28] client: Fix bluetooth_client_set_trusted() not working
- Date: Tue, 26 Mar 2019 15:48:15 +0000 (UTC)
commit e807cbd80adead977a1f53443b00b6dc9a947245
Author: Bastien Nocera <hadess hadess net>
Date: Fri Mar 22 16:03:01 2019 +0100
client: Fix bluetooth_client_set_trusted() not working
The guard was guarding against a local variable ("device") being
NULL, instead guarding against one of the arguments ("device_path")
being NULL. Depending on the compiler and runtime, this would probably
fail most of the time, leading to problems using non-pairing devices
after the initial setup.
bluetooth_client_set_trusted: assertion 'device != NULL' failed
Fixes: 27e88fc0119d6c423caade21b575d9f66f15c5ce
lib/bluetooth-client.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index 0be50890..e7aa850e 100644
--- a/lib/bluetooth-client.c
+++ b/lib/bluetooth-client.c
@@ -1465,7 +1465,7 @@ bluetooth_client_set_trusted (BluetoothClient *client,
GtkTreeIter iter;
g_return_val_if_fail (BLUETOOTH_IS_CLIENT (client), FALSE);
- g_return_val_if_fail (device != NULL, FALSE);
+ g_return_val_if_fail (device_path != NULL, FALSE);
if (get_iter_from_path (priv->store, &iter, device_path) == FALSE) {
g_debug ("Couldn't find device '%s' in tree to mark it as trusted", device_path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]