aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2009-06-30 22:07:44 +0000
committerChong Yidong2009-06-30 22:07:44 +0000
commit99061dfcf68b52602e134fdb1a0bd3417546f7a8 (patch)
tree0a7478a6da97a769ad2c28c5d35844174ea2d084 /src
parentedb54f2798ad4e684ba26e91b6c4a8887fb66f03 (diff)
downloademacs-99061dfcf68b52602e134fdb1a0bd3417546f7a8.tar.gz
emacs-99061dfcf68b52602e134fdb1a0bd3417546f7a8.zip
* xftfont.c (xftfont_open): Avoid passing NULL argument to
XftLockFace.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xftfont.c9
2 files changed, 10 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index b06bf4fac8c..c1477bc2555 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12009-06-30 Chong Yidong <cyd@stupidchicken.com>
2
3 * xftfont.c (xftfont_open): Avoid passing NULL argument to
4 XftLockFace.
5
12009-06-30 Jason Rumney <jasonr@gnu.org> 62009-06-30 Jason Rumney <jasonr@gnu.org>
2 7
3 * w32term.c (w32_initialize): Use GetModuleHandle for library that 8 * w32term.c (w32_initialize): Use GetModuleHandle for library that
diff --git a/src/xftfont.c b/src/xftfont.c
index 4a1b488bcf9..2dbef2c7f17 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -287,14 +287,15 @@ xftfont_open (f, entity, pixel_size)
287 match = XftFontMatch (display, FRAME_X_SCREEN_NUMBER (f), pat, &result); 287 match = XftFontMatch (display, FRAME_X_SCREEN_NUMBER (f), pat, &result);
288 FcPatternDestroy (pat); 288 FcPatternDestroy (pat);
289 xftfont = XftFontOpenPattern (display, match); 289 xftfont = XftFontOpenPattern (display, match);
290 ft_face = XftLockFace (xftfont); 290 if (!xftfont)
291 UNBLOCK_INPUT;
292
293 if (! xftfont)
294 { 291 {
292 UNBLOCK_INPUT;
295 XftPatternDestroy (match); 293 XftPatternDestroy (match);
296 return Qnil; 294 return Qnil;
297 } 295 }
296 ft_face = XftLockFace (xftfont);
297 UNBLOCK_INPUT;
298
298 /* We should not destroy PAT here because it is kept in XFTFONT and 299 /* We should not destroy PAT here because it is kept in XFTFONT and
299 destroyed automatically when XFTFONT is closed. */ 300 destroyed automatically when XFTFONT is closed. */
300 font_object = font_make_object (VECSIZE (struct xftfont_info), entity, size); 301 font_object = font_make_object (VECSIZE (struct xftfont_info), entity, size);