summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-08-22 11:07:12 +0300
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>2014-08-22 12:24:39 +0300
commitbdef2dbd0a08f6e44c15ea8febb66b6d9088875b (patch)
treede4d0081b46f86cc15fb40099be83bb2d6be3e42 /src
parent1f0de01bfc85f92785fcd2f0e863e471af7e6ace (diff)
bluetooth: Assert transport has a matching profile
It is a bug if a transport has no matching profile.
Diffstat (limited to 'src')
-rw-r--r--src/modules/bluetooth/module-bluez5-device.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c
index 77964c129..5398a1b5f 100644
--- a/src/modules/bluetooth/module-bluez5-device.c
+++ b/src/modules/bluetooth/module-bluez5-device.c
@@ -1890,10 +1890,8 @@ static void handle_transport_state_change(struct userdata *u, struct pa_bluetoot
pa_assert(u);
pa_assert(t);
+ pa_assert_se(cp = pa_hashmap_get(u->card->profiles, pa_bluetooth_profile_to_string(t->profile)));
- /* Update profile availability */
- if (!(cp = pa_hashmap_get(u->card->profiles, pa_bluetooth_profile_to_string(t->profile))))
- return;
pa_card_profile_set_available(cp, transport_state_to_availability(t->state));
/* Update port availability */