From 0dddb5d119ee26b40405527d0f436e089b9ba08e Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 6 Mar 2020 19:11:57 +0100 Subject: sixel: don't try to dirty an un-allocated row This may happen e.g. when resizing a grid --- sixel.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sixel.c b/sixel.c index b538fddb..90d886fe 100644 --- a/sixel.c +++ b/sixel.c @@ -59,6 +59,11 @@ sixel_erase(struct terminal *term, struct sixel *sixel) int r = (sixel->pos.row + i) & (term->grid->num_rows - 1); struct row *row = term->grid->rows[r]; + if (row == NULL) { + /* A resize/reflow may cause row to now be unallocated */ + continue; + } + row->dirty = true; for (int c = 0; c < term->grid->num_cols; c++) -- cgit v1.3