aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-11-30 11:39:18 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-11-30 11:39:18 +0000
commit7a4d1b1a6e2fa64b46d2c5f38b4e8762d850867d (patch)
treead5aad969cae5cbc1b30e7ace132767f0b6160ca
parentfont: original -> requested (diff)
font: destructor: pop elements as we go
Otherwise we'll end up free:ing the same font over and over again.
-rw-r--r--font.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/font.c b/font.c
index a21cf937..d7460e21 100644
--- a/font.c
+++ b/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);