From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> If ATT is disconnected and the state points to an invalid device it must have been destroyed in the meantime and should not be recreated. --- src/gatt-database.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gatt-database.c b/src/gatt-database.c index abcf7b759..febc2f840 100644 --- a/src/gatt-database.c +++ b/src/gatt-database.c @@ -326,8 +326,8 @@ static void att_disconnected(int err, void *user_data) state->disc_id = 0; - device = btd_adapter_get_device(state->db->adapter, &state->bdaddr, - state->bdaddr_type); + device = btd_adapter_find_device(state->db->adapter, &state->bdaddr, + state->bdaddr_type); if (!device) goto remove; -- 2.17.1