1
## Description: Check the device before removing from devices list.
2
## Origin/Author: Shih-Yuan Lee (FourDollars) <sylee@canonical.com>
3
## Bug: https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/1300623
4
Index: bluez-4.98/audio/unix.c
5
===================================================================
6
--- bluez-4.98.orig/audio/unix.c 2011-12-22 06:53:54.000000000 +0800
7
+++ bluez-4.98/audio/unix.c 2014-04-01 12:44:58.396129509 +0800
12
- clients = g_slist_remove(clients, client);
13
- start_close(client->dev, client, FALSE);
14
- client_free(client);
15
+ if (g_slist_index(clients, client) != -1) {
16
+ clients = g_slist_remove(clients, client);
17
+ start_close(client->dev, client, FALSE);
18
+ client_free(client);