summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/screen-write.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2020-06-18 08:41:57 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2020-06-18 08:41:57 +0000
commit188701727896686a6bc39498d18dae810c337976 (patch)
tree4b36ea813afcfc29321c1c39f3f4d7682a7c97a6 /usr.bin/tmux/screen-write.c
parentc50abd069038115a9946520c2d8d0a103fcbbe48 (diff)
The redraw callback could be fired with a NULL pane if it updates while
in a mode, problem reported by Martin Vahlensieck.
Diffstat (limited to 'usr.bin/tmux/screen-write.c')
-rw-r--r--usr.bin/tmux/screen-write.c5
1 files changed, 3 insertions, 2 deletions
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 <nicholas.marriott@gmail.com>
@@ -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. */