1
0
mirror of https://github.com/bluekitchen/btstack.git synced 2025-04-02 07:20:16 +00:00

check if hci_stack.control is set before accessing it in case of hardware error event

This commit is contained in:
matthias.ringwald@gmail.com 2013-11-26 21:53:22 +00:00
parent e76a89ee0a
commit 6c062428e1

@ -695,7 +695,7 @@ static void event_handler(uint8_t *packet, int size){
break; break;
case HCI_EVENT_HARDWARE_ERROR: case HCI_EVENT_HARDWARE_ERROR:
if(hci_stack.control->hw_error){ if(hci_stack.control && hci_stack.control->hw_error){
(*hci_stack.control->hw_error)(); (*hci_stack.control->hw_error)();
} }
break; break;