mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Fix crash if SIXEL colour register is invalid and remove SIXEL images before
reflow to avoid a different crash, from Anindya Mukherjee.
This commit is contained in:
@ -2283,6 +2283,10 @@ screen_write_sixelimage(struct screen_write_ctx *ctx, struct sixel_image *si,
|
||||
new = sixel_scale(si, 0, 0, 0, y - sy, sx, sy, 1);
|
||||
sixel_free(si);
|
||||
si = new;
|
||||
|
||||
/* Bail out if the image cannot be scaled. */
|
||||
if (si == NULL)
|
||||
return;
|
||||
sixel_size_in_cells(si, &x, &y);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user