diff --git a/System/os_handler.c b/System/os_handler.c index 878009f0..637a4293 100644 --- a/System/os_handler.c +++ b/System/os_handler.c @@ -4,7 +4,7 @@ * @brief tCosyTick_Handler and sPendSV_Handler * @author 迟凯峰 * @version v3.0.4 - * @date 2026.08.06 + * @date 2026.08.07 ******************************************************************************/ #include "os_var.h" @@ -525,7 +525,7 @@ __IAR_WEAK s_u8_t sPendSV_Handler(void) MCUCFG_OSIT_ATTRIBUTE /* 每监控(每PendSV假定切换任务)*/ #if (SYSCFG_DEBUGGING == __ENABLED__) - if(true){ + if(s_task_current != OS_NULL){ m_stacklen_t len = mTaskStack_Check0(); if(s_task_current->stacklen_max < len){ s_task_current->stacklen_max = len;