From 6c062428e1df1d0386fdea7301e424bf38468548 Mon Sep 17 00:00:00 2001 From: "matthias.ringwald@gmail.com" Date: Tue, 26 Nov 2013 21:53:22 +0000 Subject: [PATCH] check if hci_stack.control is set before accessing it in case of hardware error event --- src/hci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hci.c b/src/hci.c index 65f24b204..2e10ba9ed 100644 --- a/src/hci.c +++ b/src/hci.c @@ -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;