From d1e064a34df8688b16111429ca7f0712eb96476f Mon Sep 17 00:00:00 2001 From: lly Date: Tue, 24 Sep 2019 18:05:23 +0800 Subject: [PATCH] ble_mesh: add ble mesh created queue & task check --- components/bt/ble_mesh/mesh_core/adv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/bt/ble_mesh/mesh_core/adv.c b/components/bt/ble_mesh/mesh_core/adv.c index a912701908..accbc0e168 100644 --- a/components/bt/ble_mesh/mesh_core/adv.c +++ b/components/bt/ble_mesh/mesh_core/adv.c @@ -389,8 +389,10 @@ void bt_mesh_adv_init(void) { /* Change by Espressif, we should used the FreeRTOS create task method to use task */ xBleMeshQueue = xQueueCreate(150, sizeof(bt_mesh_msg_t)); - xTaskCreatePinnedToCore(adv_thread, "BLE_Mesh_ADV_Task", 3072, NULL, - configMAX_PRIORITIES - 7, NULL, TASK_PINNED_TO_CORE); + configASSERT(xBleMeshQueue); + int ret = xTaskCreatePinnedToCore(adv_thread, "BLE_Mesh_ADV_Task", 3072, NULL, + configMAX_PRIORITIES - 7, NULL, TASK_PINNED_TO_CORE); + configASSERT(ret == pdTRUE); } int bt_mesh_scan_enable(void)