diff --git a/input.c b/input.c index f8e95e19..a0775741 100644 --- a/input.c +++ b/input.c @@ -2571,8 +2571,8 @@ input_dcs_dispatch(struct input_ctx *ictx) } #ifdef ENABLE_SIXEL - w = wp->window; - if (buf[0] == 'q' && ictx->interm_len == 0) { + if (wp != NULL && buf[0] == 'q' && ictx->interm_len == 0) { + w = wp->window; if (input_split(ictx) != 0) return (0); p2 = input_get(ictx, 1, 0, 0);