mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
font: destructor: pop elements as we go
Otherwise we'll end up free:ing the same font over and over again.
This commit is contained in:
parent
4e1a6b5739
commit
7a4d1b1a6e
1 changed files with 1 additions and 1 deletions
2
font.c
2
font.c
|
|
@ -41,7 +41,7 @@ static void __attribute__((destructor))
|
|||
fini(void)
|
||||
{
|
||||
while (tll_length(font_cache) > 0)
|
||||
font_destroy(tll_front(font_cache).font);
|
||||
font_destroy(tll_pop_front(font_cache).font);
|
||||
|
||||
mtx_destroy(&ft_lock);
|
||||
FT_Done_FreeType(ft_lib);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue