aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
Diffstat (limited to 'selection.c')
-rw-r--r--selection.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/selection.c b/selection.c
index d0ed7bae..43ef2938 100644
--- a/selection.c
+++ b/selection.c
@@ -567,14 +567,14 @@ selection_extend(struct seat *seat, struct terminal *term,
void
selection_finalize(struct seat *seat, struct terminal *term, uint32_t serial)
{
- if (term->selection.start.row < 0 || term->selection.end.row < 0)
- return;
-
if (!term->selection.ongoing)
return;
term->selection.ongoing = false;
+ if (term->selection.start.row < 0 || term->selection.end.row < 0)
+ return;
+
assert(term->selection.start.row != -1);
assert(term->selection.end.row != -1);