From b412e09133289583e4e1204ebc40d8109c97f6a3 Mon Sep 17 00:00:00 2001 From: Balraj Selvaraj Date: Wed, 21 Oct 2015 19:44:04 +0530 Subject: [PATCH] Bluetooth: Gap: Adding NULL check in HAL interface When the HCI_RAW_CMD support is included, adding NULL check for bt_hal_cbacks and hci_event_recv_cb in btif_hci_event_cback to avoid ASSERT message continuosly which is consuming more power. CRs-Fixed: 922611 Change-Id: I995e6411012fe515ca725267045a97076b692b7d --- btif/src/btif_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/btif/src/btif_core.c b/btif/src/btif_core.c index e86082c16..2f414fbf1 100644 --- a/btif/src/btif_core.c +++ b/btif/src/btif_core.c @@ -726,7 +726,8 @@ bt_status_t btif_cleanup_bluetooth(void) static void btif_hci_event_cback ( tBTM_RAW_CMPL *p ) { BTIF_TRACE_DEBUG("%s", __FUNCTION__); - if(p != NULL) + if((p != NULL) && (bt_hal_cbacks != NULL) + && (bt_hal_cbacks->hci_event_recv_cb != NULL)) { HAL_CBACK(bt_hal_cbacks, hci_event_recv_cb, p->event_code, p->p_param_buf, p->param_len); -- 2.11.0