From e538bef7576456911cd8cf76d3e4ff2ef97bd671 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 2 Sep 2020 17:19:58 +0000 Subject: [PATCH] Check started flag before looking for capability. --- tty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tty.c b/tty.c index 148b1d2d..30b94e04 100644 --- a/tty.c +++ b/tty.c @@ -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);