summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-21 11:46:14 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-21 11:46:14 +0000
commit3cdd85813c10ca0b8fbf987b59cba4aa2a5e3d3e (patch)
treed7e0df24cb98704ae6d611d74a57692a7409ecf4 /vm.c
parent29927214d42105dfa82582401f9a7485c243b2c7 (diff)
* vm.c (thread_free): th->vm may be NULL when pthread_create
failed for ENOMEM. [ruby-dev:37095] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 {