From 0c125e35cb4d66d7ece86de0496505781359e29b Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 2 Sep 2020 17:19:59 +0000 Subject: Check started flag before looking for capability. --- usr.bin/tmux/tty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index 0983a5d6dd4..bf64150f22c 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.383 2020/09/02 13:46:36 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.384 2020/09/02 17:19:58 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -1905,10 +1905,10 @@ tty_set_selection(struct tty *tty, const char *buf, size_t len) char *encoded; size_t size; - if (!tty_term_has(tty->term, TTYC_MS)) - return; if (~tty->flags & TTY_STARTED) return; + if (!tty_term_has(tty->term, TTYC_MS)) + return; size = 4 * ((len + 2) / 3) + 1; /* storage for base64 */ encoded = xmalloc(size); -- cgit v1.2.3