diff --git a/src/racket/src/place.c b/src/racket/src/place.c index 27cdb555a7..7a017f0382 100644 --- a/src/racket/src/place.c +++ b/src/racket/src/place.c @@ -2957,6 +2957,11 @@ Scheme_Place_Async_Channel *place_async_channel_create() { static void async_channel_refcount(Scheme_Place_Async_Channel *ch, int for_send, int delta) { + if (!ch->lock) { + /* can happen via finalization, where the channel is already finalized + (due to the lack of ordering on finalization) */ + return; + } mzrt_mutex_lock(ch->lock); if (for_send) ch->wr_ref += delta;