Diff between c9902d2b50b9c95f005f62092338d180b04caba1 and 2abdd0364cbccd134f82c8180a6944e5c8a4013d

Changed Files

File Additions Deletions Status
android/hal-bluetooth.c +5 -3 modified

Full Patch

diff --git a/android/hal-bluetooth.c b/android/hal-bluetooth.c
index 5929fff..5f6dcbe 100644
--- a/android/hal-bluetooth.c
+++ b/android/hal-bluetooth.c
@@ -114,11 +114,13 @@ static int init(bt_callbacks_t *callbacks)
 	if (interface_ready())
 		return BT_STATUS_SUCCESS;
 
-	if (!hal_ipc_init())
-		return BT_STATUS_FAIL;
-
 	bt_hal_cbacks = callbacks;
 
+	if (!hal_ipc_init()) {
+		bt_hal_cbacks = NULL;
+		return BT_STATUS_FAIL;
+	}
+
 	cmd.service_id = HAL_SERVICE_ID_BLUETOOTH;
 
 	status = hal_ipc_cmd(HAL_SERVICE_ID_CORE, HAL_OP_REGISTER_MODULE,