diff options
-rw-r--r-- | src/lanes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lanes.c b/src/lanes.c index b1c4018..eebe06a 100644 --- a/src/lanes.c +++ b/src/lanes.c | |||
@@ -1057,7 +1057,7 @@ static int selfdestruct_atexit( lua_State *L) | |||
1057 | while( s != SELFDESTRUCT_END ) | 1057 | while( s != SELFDESTRUCT_END ) |
1058 | { | 1058 | { |
1059 | // attempt a regular unforced cancel with a small timeout | 1059 | // attempt a regular unforced cancel with a small timeout |
1060 | bool_t cancelled = thread_cancel( s, 0.0001, FALSE); | 1060 | bool_t cancelled = THREAD_ISNULL( s->thread) || thread_cancel( s, 0.0001, FALSE); |
1061 | // if we failed, and we know the thread is waiting on a linda | 1061 | // if we failed, and we know the thread is waiting on a linda |
1062 | if( cancelled == FALSE && s->status == WAITING && s->waiting_on != NULL) | 1062 | if( cancelled == FALSE && s->status == WAITING && s->waiting_on != NULL) |
1063 | { | 1063 | { |