From fd2f238560fb1dfc664036618f05eaa9ebc8cbaa Mon Sep 17 00:00:00 2001 From: akr Date: Wed, 12 Jan 2011 10:35:36 +0000 Subject: * vm.c (thread_free): reset ruby_current_thread if it points the thread to free. * gc.c (slot_sweep): don't call RUBY_VM_SET_FINALIZER_INTERRUPT if there is no current thread. [ruby-dev:43000] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- gc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gc.c') diff --git a/gc.c b/gc.c index 04e87d38ef..39979138bb 100644 --- a/gc.c +++ b/gc.c @@ -1958,7 +1958,10 @@ slot_sweep(rb_objspace_t *objspace, struct heaps_slot *sweep_slot) objspace->heap.final_num += final_num; if (deferred_final_list) { - RUBY_VM_SET_FINALIZER_INTERRUPT(GET_THREAD()); + rb_thread_t *th = GET_THREAD(); + if (th) { + RUBY_VM_SET_FINALIZER_INTERRUPT(th); + } } } -- cgit v1.2.3