Check started flag before looking for capability.

pull/2378/head
nicm 2020-09-02 17:19:58 +00:00
parent 37b1600d9c
commit e538bef757
1 changed files with 2 additions and 2 deletions

4
tty.c
View File

@ -1905,10 +1905,10 @@ tty_set_selection(struct tty *tty, const char *buf, size_t len)
char *encoded; char *encoded;
size_t size; size_t size;
if (!tty_term_has(tty->term, TTYC_MS))
return;
if (~tty->flags & TTY_STARTED) if (~tty->flags & TTY_STARTED)
return; return;
if (!tty_term_has(tty->term, TTYC_MS))
return;
size = 4 * ((len + 2) / 3) + 1; /* storage for base64 */ size = 4 * ((len + 2) / 3) + 1; /* storage for base64 */
encoded = xmalloc(size); encoded = xmalloc(size);