summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-04-17 15:39:37 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-04-17 15:39:37 +0000
commit3bb606b245879dff4029d6bd96841cde5161f2a4 (patch)
treefcf40b4dd1aa266835e23ced54448c1d170e54a4 /eval.c
parentfd003e6a8fb13425ad68514412eed1126f84ea80 (diff)
downloadruby-3bb606b245879dff4029d6bd96841cde5161f2a4.tar.gz
ruby-3bb606b245879dff4029d6bd96841cde5161f2a4.tar.xz
ruby-3bb606b245879dff4029d6bd96841cde5161f2a4.zip
2000-04-18
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index 4cd3d7bf5..fe575ceb4 100644
--- a/eval.c
+++ b/eval.c
@@ -6359,8 +6359,10 @@ thread_free(th)
th->stk_ptr = 0;
if (th->locals) st_free_table(th->locals);
if (th->status != THREAD_KILLED) {
- th->prev->next = th->next;
- th->next->prev = th->prev;
+ if (th->prev)
+ th->prev->next = th->next;
+ if (th->next)
+ th->next->prev = th->prev;
}
if (th != main_thread) free(th);
}