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 Abdelatif Guettouche
parent 2fd98c99d7
commit 666d718302

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)
{