diff --git a/src/clock.c b/src/clock.c index 0880d8d24189b242b2a8cf405ef6c6f2b97ce00b..07dc1bce58f7396a36a235d5f54d234ca8dc5fc3 100644 --- a/src/clock.c +++ b/src/clock.c @@ -72,6 +72,11 @@ void rt_tick_increase(void) /* check time slice */ thread = rt_thread_self(); + if (thread == RT_NULL) + { + rt_hw_interrupt_enable(level); + return; + } -- thread->remaining_tick; if (thread->remaining_tick == 0)