bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#3659: FW: 23.0.95; crash on set-frame-font


From: Chong Yidong
Subject: bug#3659: FW: 23.0.95; crash on set-frame-font
Date: Fri, 26 Jun 2009 23:18:21 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Glenn Morris <rgm@gnu.org> writes:

> "xftfont" is always 0 (perhaps I am printing it wrong? I use "pp".)

Does the following patch prevent the crash?

*** trunk/src/xftfont.c.~1.24.~ 2009-05-11 12:06:41.000000000 -0400
--- trunk/src/xftfont.c 2009-06-26 23:15:32.000000000 -0400
***************
*** 287,300 ****
    match = XftFontMatch (display, FRAME_X_SCREEN_NUMBER (f), pat, &result);
    FcPatternDestroy (pat);
    xftfont = XftFontOpenPattern (display, match);
-   ft_face = XftLockFace (xftfont);
-   UNBLOCK_INPUT;
- 
    if (! xftfont)
      {
        XftPatternDestroy (match);
        return Qnil;
      }
    /* 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);
--- 287,301 ----
    match = XftFontMatch (display, FRAME_X_SCREEN_NUMBER (f), pat, &result);
    FcPatternDestroy (pat);
    xftfont = XftFontOpenPattern (display, match);
    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);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]