diff options
author | Chong Yidong <[email protected]> | 2009-06-30 22:07:44 +0000 |
---|---|---|
committer | Chong Yidong <[email protected]> | 2009-06-30 22:07:44 +0000 |
commit | 99061dfcf68b52602e134fdb1a0bd3417546f7a8 (patch) | |
tree | 0a7478a6da97a769ad2c28c5d35844174ea2d084 /src/xftfont.c | |
parent | edb54f2798ad4e684ba26e91b6c4a8887fb66f03 (diff) |
* xftfont.c (xftfont_open): Avoid passing NULL argument to
XftLockFace.
Diffstat (limited to 'src/xftfont.c')
-rw-r--r-- | src/xftfont.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/xftfont.c b/src/xftfont.c index 4a1b488bcf..2dbef2c7f1 100644 --- a/src/xftfont.c +++ b/src/xftfont.c @@ -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); |