mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-24 22:28:29 +00:00
Fix GPU texture leak in free_sprite_data()
The decorations_map texture was never freed due to a typo - the code checked decorations_map.texture_id but then freed sprite_map.texture_id (which was already freed on the previous line). This leaked ~1-4 MB of GPU memory each time a font group was deleted, which occurs when changing font size or reloading font configuration.
This commit is contained in:
parent
524fe6ae3b
commit
6b44d8520e
1 changed files with 1 additions and 1 deletions
|
|
@ -118,7 +118,7 @@ free_sprite_data(FONTS_DATA_HANDLE fg) {
|
|||
SpriteMap *sprite_map = (SpriteMap*)fg->sprite_map;
|
||||
if (sprite_map) {
|
||||
if (sprite_map->texture_id) free_texture(&sprite_map->texture_id);
|
||||
if (sprite_map->decorations_map.texture_id) free_texture(&sprite_map->texture_id);
|
||||
if (sprite_map->decorations_map.texture_id) free_texture(&sprite_map->decorations_map.texture_id);
|
||||
free(sprite_map);
|
||||
fg->sprite_map = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue