From 188701727896686a6bc39498d18dae810c337976 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 18 Jun 2020 08:41:57 +0000 Subject: The redraw callback could be fired with a NULL pane if it updates while in a mode, problem reported by Martin Vahlensieck. --- usr.bin/tmux/screen-write.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.bin/tmux') diff --git a/usr.bin/tmux/screen-write.c b/usr.bin/tmux/screen-write.c index 81a1a74f72d..2141aef4c01 100644 --- a/usr.bin/tmux/screen-write.c +++ b/usr.bin/tmux/screen-write.c @@ -1,4 +1,4 @@ -/* $OpenBSD: screen-write.c,v 1.184 2020/06/02 20:51:46 nicm Exp $ */ +/* $OpenBSD: screen-write.c,v 1.185 2020/06/18 08:41:56 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -103,7 +103,8 @@ screen_write_redraw_cb(const struct tty_ctx *ttyctx) { struct window_pane *wp = ttyctx->arg; - wp->flags |= PANE_REDRAW; + if (wp != NULL) + wp->flags |= PANE_REDRAW; } /* Update context for client. */ -- cgit v1.2.3