aboutsummaryrefslogtreecommitdiff
path: root/chopstx.c
diff options
context:
space:
mode:
Diffstat (limited to 'chopstx.c')
-rw-r--r--chopstx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/chopstx.c b/chopstx.c
index 0e394e4..9318a38 100644
--- a/chopstx.c
+++ b/chopstx.c
@@ -357,7 +357,7 @@ sched (void)
register struct chx_thread *tp asm ("r0");
tp = chx_ready_pop ();
- if (tp->flag_sched_rr)
+ if (tp && tp->flag_sched_rr)
{
chx_spin_lock (&q_timer.lock);
chx_timer_insert (tp, PREEMPTION_USEC);