aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-03-06 18:11:57 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-03-06 18:11:57 +0000
commit0dddb5d119ee26b40405527d0f436e089b9ba08e (patch)
tree228faed32b442aac1b7cf9602e6de8690fb90393
parentconfig: change default CSD button width from 22 -> 26 (diff)
sixel: don't try to dirty an un-allocated row
This may happen e.g. when resizing a grid
-rw-r--r--sixel.c5
1 files changed, 5 insertions, 0 deletions
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++)