sixel: don't try to dirty an un-allocated row

This may happen e.g. when resizing a grid
This commit is contained in:
Daniel Eklöf 2020-03-06 19:11:57 +01:00
parent 27ef5b472a
commit 0dddb5d119
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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++)