From 2a9280fa279a0b8c96c25a65b79e870bea6a6385 Mon Sep 17 00:00:00 2001 From: cospine Date: Tue, 18 Apr 2023 21:07:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=93while=E5=BE=AA=E7=8E=AF=E4=B8=8D?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E6=97=B6=EF=BC=8Ctcb=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E8=A2=AB=E6=A3=80=E6=9F=A5=E6=98=AF=E5=90=A6=E5=90=88=E6=B3=95?= =?UTF-8?q?=EF=BC=88=E6=98=AF=E5=90=A6=E4=B8=BA=E7=A9=BA=E6=8C=87=E9=92=88?= =?UTF-8?q?=EF=BC=89=EF=BC=8C=E5=AD=98=E5=9C=A8=E7=A9=BA=E6=8C=87=E9=92=88?= =?UTF-8?q?=E9=A3=8E=E9=99=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nxp/MIMXRT1052/components/osa/fsl_os_abstraction_bm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/vendor_bsp/nxp/MIMXRT1052/components/osa/fsl_os_abstraction_bm.c b/platform/vendor_bsp/nxp/MIMXRT1052/components/osa/fsl_os_abstraction_bm.c index f191e304..8a1d0c9e 100644 --- a/platform/vendor_bsp/nxp/MIMXRT1052/components/osa/fsl_os_abstraction_bm.c +++ b/platform/vendor_bsp/nxp/MIMXRT1052/components/osa/fsl_os_abstraction_bm.c @@ -312,7 +312,7 @@ osa_status_t OSA_TaskSetPriority(osa_task_handle_t taskHandle, osa_task_priority } list_element = LIST_GetNext(list_element); } - if (ptaskStruct->priority > tcb->priority) + if ((NULL == tcb) || (ptaskStruct->priority > tcb->priority)) { OSA_InterruptDisable(); (void)LIST_AddTail(&s_osaState.taskList, (list_element_handle_t)(void *)&(ptaskStruct->link));