[gnome-bluetooth/wip/hadess/fix-set-trusted: 1/3] client: Fix bluetooth_client_set_trusted() not working
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/wip/hadess/fix-set-trusted: 1/3] client: Fix bluetooth_client_set_trusted() not working
- Date: Fri, 22 Mar 2019 15:27:31 +0000 (UTC)
commit bf74d0dadf076f46960eebda5407dac095fd7156
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
non-NULL, instead of one of the arguments ("device_path") being
non-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]