From 52afc79476d98cec2fc2c81e3ea3adeb98a9ddb9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 6 May 2023 09:37:55 +0530 Subject: [PATCH] Fix re-using an image id for an animated image for a still image causing a crash Fixes #6244 --- docs/changelog.rst | 2 ++ kitty/graphics.c | 1 + 2 files changed, 3 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 07906415b..51bc001b0 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -52,6 +52,8 @@ Detailed list of changes - diff kitten: Fix a regression in 0.28.0 that broke using relative paths as arguments to the kitten (:iss:`6325`) +- Fix re-using an image id for an animated image for a still image causing a crash (:iss:`6244`) + 0.28.1 [2023-04-21] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/graphics.c b/kitty/graphics.c index 479109c9f..868bc9b55 100644 --- a/kitty/graphics.c +++ b/kitty/graphics.c @@ -561,6 +561,7 @@ handle_add_command(GraphicsManager *self, const GraphicsCommand *g, const uint8_ img->root_frame_data_loaded = false; img->is_drawn = false; img->current_frame_shown_at = 0; + img->extra_framecnt = 0; free_image(self, img); *is_dirty = true; self->layers_dirty = true;