aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--st.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/st.c b/st.c
index 9079834..672c47a 100644
--- a/st.c
+++ b/st.c
@@ -2993,13 +2993,9 @@ xunloadfont(Font *f) {
void
xunloadfonts(void) {
- int i;
-
/* Free the loaded fonts in the font cache. */
- for(i = 0; i < frclen; i++) {
- XftFontClose(xw.dpy, frc[i].font);
- }
- frclen = 0;
+ while(frclen > 0)
+ XftFontClose(xw.dpy, frc[--frclen].font);
xunloadfont(&dc.font);
xunloadfont(&dc.bfont);