bluetooth: host: a2dp: Fix null ops before calling configured callback
If stream->ops is NULL and not checked, it works fail. Signed-off-by: Cheng Chang <cheng.chang@nxp.com>
This commit is contained in:
parent
8f37d3bf52
commit
f4153476cd
@ -419,7 +419,7 @@ static int bt_a2dp_set_config_cb(struct bt_avdtp_req *req, struct net_buf *buf)
|
||||
}
|
||||
|
||||
ops = stream->ops;
|
||||
if ((!req->status) && (ops->configured != NULL)) {
|
||||
if ((!req->status) && (ops != NULL) && (ops->configured != NULL)) {
|
||||
ops->configured(stream);
|
||||
}
|
||||
return 0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user