Fix re-using an image id for an animated image for a still image causing a crash

Fixes #6244
This commit is contained in:
Kovid Goyal 2023-05-06 09:37:55 +05:30
parent 877d8d7008
commit 52afc79476
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 3 additions and 0 deletions

View File

@ -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`) - 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] 0.28.1 [2023-04-21]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -561,6 +561,7 @@ handle_add_command(GraphicsManager *self, const GraphicsCommand *g, const uint8_
img->root_frame_data_loaded = false; img->root_frame_data_loaded = false;
img->is_drawn = false; img->is_drawn = false;
img->current_frame_shown_at = 0; img->current_frame_shown_at = 0;
img->extra_framecnt = 0;
free_image(self, img); free_image(self, img);
*is_dirty = true; *is_dirty = true;
self->layers_dirty = true; self->layers_dirty = true;