From 307d62484cc0f908458d10eefca12180ba50e755 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Tue, 5 Jan 2021 00:31:36 +0200 Subject: [PATCH] sco-source: don't crash in do_stop if transport disappeared --- spa/plugins/bluez5/sco-source.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spa/plugins/bluez5/sco-source.c b/spa/plugins/bluez5/sco-source.c index cafe9f499..67a2f0b96 100644 --- a/spa/plugins/bluez5/sco-source.c +++ b/spa/plugins/bluez5/sco-source.c @@ -537,7 +537,8 @@ static int do_remove_source(struct spa_loop *loop, { struct impl *this = user_data; - spa_bt_sco_io_set_source_cb(this->transport->sco_io, NULL, NULL); + if (this->transport) + spa_bt_sco_io_set_source_cb(this->transport->sco_io, NULL, NULL); return 0; }