mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
sixel: don't try to dirty an un-allocated row
This may happen e.g. when resizing a grid
This commit is contained in:
parent
27ef5b472a
commit
0dddb5d119
1 changed files with 5 additions and 0 deletions
5
sixel.c
5
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++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue