mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/esp_common/freertos: Handle NULL being passed to vTaskDelete
This commit is contained in:
parent
1a4af03a94
commit
56d2997d95
@ -116,6 +116,9 @@ void vTaskDelete(TaskHandle_t xTaskToDelete)
|
||||
DEBUG("%s pid=%d task=%p\n", __func__, thread_getpid(), xTaskToDelete);
|
||||
|
||||
uint32_t pid = (uint32_t)xTaskToDelete;
|
||||
if (pid == 0) {
|
||||
pid = thread_getpid();
|
||||
}
|
||||
assert(pid_is_valid(pid));
|
||||
|
||||
/* remove the task from scheduling */
|
||||
|
Loading…
Reference in New Issue
Block a user