summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/shared/gatt-client.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c
index f0499cc0e..9ffc10b0b 100644
--- a/src/shared/gatt-client.c
+++ b/src/shared/gatt-client.c
@@ -3809,6 +3809,9 @@ bool bt_gatt_client_idle_unregister(struct bt_gatt_client *client,
{
struct idle_cb *idle = UINT_TO_PTR(id);
+ if (!client || !id)
+ return false;
+
if (queue_remove(client->idle_cbs, idle)) {
idle_destroy(idle);
return true;