소스 검색

Update ulog.c

Use `rt_thread_self()` to determine whether the scheduler is started or not.
Bernard Xiong 4 년 전
부모
커밋
3fa35a398b
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      components/utilities/ulog/ulog.c

+ 1 - 1
components/utilities/ulog/ulog.c

@@ -337,7 +337,7 @@ RT_WEAK rt_size_t ulog_formater(char *log_buf, rt_uint32_t level, const char *ta
         {
             rt_size_t name_len = 0;
             const char *thread_name = "N/A";
-            if (rt_thread_self()->name)
+            if (rt_thread_self())
             {
                 thread_name = rt_thread_self()->name;
             }