aboutsummaryrefslogtreecommitdiffstats
path: root/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread.c b/thread.c
index 2d64e5384c..8a84561b65 100644
--- a/thread.c
+++ b/thread.c
@@ -3725,7 +3725,7 @@ timer_thread_function(void *arg)
void
rb_thread_stop_timer_thread(int close_anyway)
{
- if (timer_thread_id && native_stop_timer_thread(close_anyway)) {
+ if (TIMER_THREAD_CREATED_P() && native_stop_timer_thread(close_anyway)) {
native_reset_timer_thread();
}
}