xtensa/esp32: Fix crash issue caused by null pointer operation
This commit is contained in:
parent
2fd98c99d7
commit
666d718302
@ -1802,8 +1802,10 @@ static int32_t esp_task_create_pinned_to_core(void *entry,
|
|||||||
(char * const *)param);
|
(char * const *)param);
|
||||||
if (pid > 0)
|
if (pid > 0)
|
||||||
{
|
{
|
||||||
*((int *)task_handle) = pid;
|
if (task_handle != NULL)
|
||||||
|
{
|
||||||
|
*((int *)task_handle) = pid;
|
||||||
|
}
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
if (core_id < CONFIG_SMP_NCPUS)
|
if (core_id < CONFIG_SMP_NCPUS)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user