summaryrefslogtreecommitdiffstats
path: root/screen.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2024-03-21 11:37:09 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2024-03-21 11:37:09 +0000
commitaa17f0e0c1c8b3f1d6fc8617613c74f07de66fae (patch)
treeb90b9f0c25c04409339167b9d861eef3c10161f3 /screen.c
parentbf5d3f2e26bb9add9e31d72932aea5580be8b653 (diff)
Fix crash if SIXEL colour register is invalid and remove SIXEL images before
reflow to avoid a different crash, from Anindya Mukherjee.
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/screen.c b/screen.c
index f73a8505..0eaf4698 100644
--- a/screen.c
+++ b/screen.c
@@ -308,12 +308,12 @@ screen_resize_cursor(struct screen *s, u_int sx, u_int sy, int reflow,
if (sy != screen_size_y(s))
screen_resize_y(s, sy, eat_empty, &cy);
- if (reflow) {
#ifdef ENABLE_SIXEL
- image_free_all(s);
+ image_free_all(s);
#endif
+
+ if (reflow)
screen_reflow(s, sx, &cx, &cy, cursor);
- }
if (cy >= s->grid->hsize) {
s->cx = cx;