aboutsummaryrefslogtreecommitdiff
path: root/sixel.c
diff options
context:
space:
mode:
Diffstat (limited to 'sixel.c')
-rw-r--r--sixel.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sixel.c b/sixel.c
index cac60493..903fe8e4 100644
--- a/sixel.c
+++ b/sixel.c
@@ -1344,8 +1344,10 @@ sixel_colors_set(struct terminal *term, unsigned count)
unsigned new_palette_size = min(max(2, count), SIXEL_MAX_COLORS);
LOG_DBG("sixel palette size set to %u", new_palette_size);
- free(term->sixel.palette);
- term->sixel.palette = NULL;
+ free(term->sixel.private_palette);
+ free(term->sixel.shared_palette);
+ term->sixel.private_palette = NULL;
+ term->sixel.shared_palette = NULL;
term->sixel.palette_size = new_palette_size;
sixel_colors_report_current(term);