Diff between 035b98b081c0c440ee4fed35292c901126157ce8 and 3d9046dd90ce547d24735d83aefdba7389f4513d

Changed Files

File Additions Deletions Status
src/device.c +1 -1 modified

Full Patch

diff --git a/src/device.c b/src/device.c
index 75a5984..1e13565 100644
--- a/src/device.c
+++ b/src/device.c
@@ -2766,7 +2766,7 @@ static void gatt_service_removed(struct gatt_db_attribute *attr,
 	 */
 	l = g_slist_find_custom(device->uuids, prim->uuid, bt_uuid_strcmp);
 
-	if (!g_slist_find_custom(device->primaries, prim->uuid,
+	if (l && !g_slist_find_custom(device->primaries, prim->uuid,
 							prim_uuid_cmp)) {
 		g_free(l->data);
 		device->uuids = g_slist_delete_link(device->uuids, l);