From 1f808781f4b92ff8ca5dfc476065ede8c18a076e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Thu, 11 Jul 2019 11:11:12 +0200 Subject: [PATCH] selection: selection_finalize() ignores invalid selections --- selection.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/selection.c b/selection.c index 8860ef88..cedf8d10 100644 --- a/selection.c +++ b/selection.c @@ -66,6 +66,9 @@ selection_finalize(struct terminal *term) if (!selection_enabled(term)) return; + if (term->selection.start.row == -1 || term->selection.end.row == -1) + return; + assert(term->selection.start.row != -1); assert(term->selection.end.row != -1); }