summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/thread.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/thread.c b/src/thread.c
index 0cd1ae33dc2..e2158019839 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -645,7 +645,10 @@ mark_threads_callback (void *ignore)
Lisp_Object thread_obj;
XSETTHREAD (thread_obj, iter);
- mark_object (thread_obj);
+ /* Don't mark main_thread, since it is not allocated
+ dynamically, thus nothing would unmark it. */
+ if (iter != &main_thread)
+ mark_object (thread_obj);
mark_one_thread (iter);
}
}