summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--vm.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 223e2873f1..c7384b5c9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Nov 21 16:06:54 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * vm.c (thread_free): th->vm may be NULL when pthread_create
+ failed for ENOMEM. [ruby-dev:37095]
+
Thu Nov 20 07:33:15 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/logger.rb (Logger): should handle the case that cvs/svn do
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 {