Commit 99061dfc authored by Chong Yidong's avatar Chong Yidong
Browse files

* xftfont.c (xftfont_open): Avoid passing NULL argument to

XftLockFace.
parent edb54f27
2009-06-30 Chong Yidong <cyd@stupidchicken.com>
* xftfont.c (xftfont_open): Avoid passing NULL argument to
XftLockFace.
2009-06-30 Jason Rumney <jasonr@gnu.org>
* w32term.c (w32_initialize): Use GetModuleHandle for library that
......
......@@ -287,14 +287,15 @@ xftfont_open (f, entity, pixel_size)
match = XftFontMatch (display, FRAME_X_SCREEN_NUMBER (f), pat, &result);
FcPatternDestroy (pat);
xftfont = XftFontOpenPattern (display, match);
ft_face = XftLockFace (xftfont);
UNBLOCK_INPUT;
if (! xftfont)
if (!xftfont)
{
UNBLOCK_INPUT;
XftPatternDestroy (match);
return Qnil;
}
ft_face = XftLockFace (xftfont);
UNBLOCK_INPUT;
/* We should not destroy PAT here because it is kept in XFTFONT and
destroyed automatically when XFTFONT is closed. */
font_object = font_make_object (VECSIZE (struct xftfont_info), entity, size);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment