summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2021-04-19 06:50:58 +0800
committerGitHub <[email protected]>2021-04-19 06:50:58 +0800
commit3fa35a398bac2976ffbc7bfd3040c5686abed91c (patch)
tree163faf1f3d86a1a76f314c95d2781f3ed9e934d6
parentfc97cd23d80bf7d036b7d3afe359380b2b6aca23 (diff)
Update ulog.c
Use `rt_thread_self()` to determine whether the scheduler is started or not.
-rw-r--r--components/utilities/ulog/ulog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/utilities/ulog/ulog.c b/components/utilities/ulog/ulog.c
index 602385a200..9dd2ed2fd0 100644
--- a/components/utilities/ulog/ulog.c
+++ b/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;
}