summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm.c b/vm.c
index 5bf684237e..2bb050d19e 100644
--- a/vm.c
+++ b/vm.c
@@ -1486,7 +1486,7 @@ thread_free(void *ptr)
}
#endif
- if (th->vm->main_thread == th) {
+ if (th->vm && th->vm->main_thread == th) {
RUBY_GC_INFO("main thread\n");
}
else {