bluez5: Fix NULL dereference in backend-native

Fixes: #602
This commit is contained in:
Frédéric Danis 2021-01-22 15:07:06 +01:00 committed by Wim Taymans
parent 2521e6db1b
commit f464d8c596

View file

@ -369,6 +369,8 @@ static bool rfcomm_hfp_ag(struct spa_source *source, char* buf)
if (rfcomm->transport == NULL) {
spa_log_warn(backend->log, NAME": can't create transport: %m");
// TODO: We should manage the missing transport
rfcomm_send_reply(source, "ERROR");
return true;
}
rfcomm->transport->codec = selected_codec;
spa_bt_device_connect_profile(rfcomm->device, rfcomm->profile);