mirror of git://git.sysmocom.de/ofono
handsfree-audio: Fix crash
For HFP 1.5 devices the driver is always set to NULL. So if the AG establishes the SCO connection first, we might crash.
This commit is contained in:
parent
54c9068ff2
commit
80a71f32cd
|
@ -203,7 +203,7 @@ static gboolean sco_accept(GIOChannel *io, GIOCondition cond,
|
|||
send_new_connection(card->path, nsk, card->selected_codec);
|
||||
close(nsk);
|
||||
|
||||
if (card->driver->sco_connected_hint)
|
||||
if (card->driver && card->driver->sco_connected_hint)
|
||||
card->driver->sco_connected_hint(card);
|
||||
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in New Issue