selection: selection_finalize() ignores invalid selections

This commit is contained in:
Daniel Eklöf 2019-07-11 11:11:12 +02:00
parent 0facfa4da7
commit 1f808781f4
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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);
}