diff --git a/src/stream_interface.c b/src/stream_interface.c index 4b5b760c8..52aa7c43d 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -760,8 +760,12 @@ static struct task * si_cs_send(struct conn_stream *cs) struct task *si_cs_io_cb(struct task *t, void *ctx, unsigned short state) { struct stream_interface *si = ctx; + struct conn_stream *cs = objt_cs(si->end); + + if (!cs) + return NULL; if (!(si->wait_list.wait_reason & SUB_CAN_SEND)) - si_cs_send(__objt_cs(si->end)); + si_cs_send(cs); return (NULL); }