xtensa/esp32: Fix crash issue caused by null pointer operation

This commit is contained in:
chenwen 2021-04-27 16:56:18 +08:00 committed by liuhaitao
parent ade6997643
commit 98d97f27fd

View file

@ -1802,8 +1802,10 @@ static int32_t esp_task_create_pinned_to_core(void *entry,
(char * const *)param);
if (pid > 0)
{
*((int *)task_handle) = pid;
if (task_handle != NULL)
{
*((int *)task_handle) = pid;
}
#ifdef CONFIG_SMP
if (core_id < CONFIG_SMP_NCPUS)
{