summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/thread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/thread.c b/firmware/thread.c
index e4dcbbc..aeedbac 100644
--- a/firmware/thread.c
+++ b/firmware/thread.c
@@ -671,8 +671,8 @@ void remove_thread(struct thread_entry *thread)
if (thread == cores[CURRENT_CORE].sleeping)
remove_from_list(&cores[CURRENT_CORE].sleeping, thread);
-
- remove_from_list(NULL, thread);
+ else
+ remove_from_list(NULL, thread);
}
#ifdef HAVE_PRIORITY_SCHEDULING