summaryrefslogtreecommitdiff
path: root/src/xftglyphs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xftglyphs.c')
-rw-r--r--src/xftglyphs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xftglyphs.c b/src/xftglyphs.c
index 3a3dfd2..bb9057e 100644
--- a/src/xftglyphs.c
+++ b/src/xftglyphs.c
@@ -1245,8 +1245,11 @@ XftFontCheckGlyph (Display *dpy,
/*
* Make unloading faster by moving newly-referenced glyphs to the front
* of the list, leaving the less-used glyphs on the end.
+ *
+ * If the glyph is zero, the older/newer data may not have been set.
*/
- if (font->track_mem_usage
+ if (glyph != 0
+ && font->track_mem_usage
&& font->total_inuse > 10
&& font->newest != FT_UINT_MAX
&& font->newest != glyph)