Merge branch 'bugfix/btdm_fix_write_char_crash_after_disconnection_v3.1' into 'release/v3.1'

Component/bt: fix write char crash after disconnection (backport v3.1)

See merge request idf/esp-idf!4211
This commit is contained in:
Jiang Jiang Jian 2019-02-01 21:29:15 +08:00
commit cfe10825cf

View file

@ -1845,7 +1845,7 @@ BOOLEAN L2CA_CheckIsCongest(UINT16 fixed_cid, UINT16 handle)
tL2C_LCB *p_lcb;
p_lcb = l2cu_find_lcb_by_handle(handle);
if (p_lcb != NULL) {
if (p_lcb != NULL && p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL] != NULL) {
return p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL]->cong_sent;
}