summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/xterm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 5ae37327d7f..18a6619abba 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -6497,7 +6497,9 @@ x_list_fonts (f, pattern, size, maxnames)
}
else
try_XLoadQueryFont = 0;
- XFreeFont (font);
+
+ if (font)
+ XFreeFont (dpy, font);
}
if (!try_XLoadQueryFont)