From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> If ATT is not connected there is no point in creating a request since that will likely fail at bt_att_send. --- src/shared/gatt-client.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c index a34b00188..4b3f553f1 100644 --- a/src/shared/gatt-client.c +++ b/src/shared/gatt-client.c @@ -141,6 +141,9 @@ static struct request *request_create(struct bt_gatt_client *client) { struct request *req; + if (!client->att) + return NULL; + req = new0(struct request, 1); if (client->next_request_id < 1) -- 2.13.6 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html