+2009-09-29 Zoltan Varga <vargaz@gmail.com>
+
+ * solaris_threads.c (GC_thr_daemon): Don't crash if GC_lookup_thread () returns
+ NULL.
+
2009-09-25 Zoltan Varga <vargaz@gmail.com>
* solaris_threads.c (GC_get_orig_stack_size): Remove the annoying 'Large stack
UNLOCK();
} else {
t = GC_lookup_thread(departed);
- GC_multithreaded--;
- if (!(t -> flags & CLIENT_OWNS_STACK)) {
- GC_stack_free(t -> stack, t -> stack_size);
- }
- if (t -> flags & DETACHED) {
- GC_delete_thread(departed);
- } else {
- t -> status = status;
- t -> flags |= FINISHED;
- cond_signal(&(t -> join_cv));
- cond_broadcast(&GC_prom_join_cv);
- }
+ GC_multithreaded--;
+ if (t) {
+ if (!(t -> flags & CLIENT_OWNS_STACK)) {
+ GC_stack_free(t -> stack, t -> stack_size);
+ }
+ if (t -> flags & DETACHED) {
+ GC_delete_thread(departed);
+ } else {
+ t -> status = status;
+ t -> flags |= FINISHED;
+ cond_signal(&(t -> join_cv));
+ cond_broadcast(&GC_prom_join_cv);
+ }
+ }
UNLOCK();
}
}