summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2019-03-22 16:03:01 +0100
committerBastien Nocera <hadess@hadess.net>2019-03-22 17:18:03 +0100
commitcb677b5ccfe62d78a87e90fbccce723be78219dc (patch)
treef6c4aba36e1341023f7e1ec3aa3fbf47d0bcedcf
parent44e4014f1c049bdc072e73160cd6a3f657e6d6b2 (diff)
downloadgnome-bluetooth-cb677b5ccfe62d78a87e90fbccce723be78219dc.tar.gz
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
-rw-r--r--lib/bluetooth-client.c2
1 files changed, 1 insertions, 1 deletions
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);