summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMikel Astiz <mikel.astiz@bmw-carit.de>2012-08-31 12:50:59 +0200
committerJaska Uimonen <jaska.uimonen@intel.com>2013-01-24 09:29:36 +0200
commit3124a216b11792eddef410a3974b09991e87019a (patch)
tree2426a0c4fe3a63456c70e1017f37703c05319091 /src
parent9dcb9a9d436c4d006810955fdad5d07a823323ba (diff)
downloadpulseaudio-panda-3124a216b11792eddef410a3974b09991e87019a.tar.gz
pulseaudio-panda-3124a216b11792eddef410a3974b09991e87019a.tar.bz2
pulseaudio-panda-3124a216b11792eddef410a3974b09991e87019a.zip
bluetooth: Fix check if transport exists before acquire
The transport might have disapeared exactly before acquiring, so we should avoid an assertion failure, in this case inside the function pa_bluetooth_discovery_get_by_path().
Diffstat (limited to 'src')
-rw-r--r--src/modules/bluetooth/module-bluetooth-device.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
index c83fc80c..8da0d7e3 100644
--- a/src/modules/bluetooth/module-bluetooth-device.c
+++ b/src/modules/bluetooth/module-bluetooth-device.c
@@ -326,6 +326,11 @@ static int bt_transport_acquire(struct userdata *u, pa_bool_t start) {
const char *accesstype = "rw";
const pa_bluetooth_transport *t;
+ if (u->transport == NULL) {
+ pa_log("Transport no longer available.");
+ return -1;
+ }
+
if (bt_transport_is_acquired(u)) {
if (start)
goto done;