mirror of
https://github.com/espressif/esp-matter.git
synced 2026-04-27 19:13:13 +00:00
Added null check for callback events
This commit is contained in:
@@ -930,7 +930,9 @@ static esp_err_t chip_init(event_callback_t callback)
|
||||
return ESP_FAIL;
|
||||
}
|
||||
PlatformMgr().AddEventHandler(device_callback_internal, static_cast<intptr_t>(NULL));
|
||||
PlatformMgr().AddEventHandler(callback, static_cast<intptr_t>(NULL));
|
||||
if(callback) {
|
||||
PlatformMgr().AddEventHandler(callback, static_cast<intptr_t>(NULL));
|
||||
}
|
||||
#if CHIP_DEVICE_CONFIG_ENABLE_THREAD
|
||||
if (ThreadStackMgr().InitThreadStack() != CHIP_NO_ERROR) {
|
||||
ESP_LOGE(TAG, "Failed to initialize Thread stack");
|
||||
|
||||
Reference in New Issue
Block a user