]> git.eshelyaron.com Git - emacs.git/commitdiff
* xftfont.c (xftfont_open): Avoid passing NULL argument to
authorChong Yidong <cyd@stupidchicken.com>
Tue, 30 Jun 2009 22:07:44 +0000 (22:07 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Tue, 30 Jun 2009 22:07:44 +0000 (22:07 +0000)
XftLockFace.

src/ChangeLog
src/xftfont.c

index b06bf4fac8ca09e38e5c4a6423ca90b98da819b5..c1477bc255530e13beffcf3041a0c5159176a078 100644 (file)
@@ -1,3 +1,8 @@
+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
index 4a1b488bcf9d7efc42968aacf00ead5afae67c03..2dbef2c7f174eb3a5fbe88408c1595c425695342 100644 (file)
@@ -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);