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

View File

@ -695,7 +695,7 @@ static void event_handler(uint8_t *packet, int size){
break;
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)();
}
break;