From: Eli Zaretskii Date: Mon, 26 Nov 2012 17:46:35 +0000 (+0200) Subject: Don't crash if internal-char-font is called on non-GUI frames. X-Git-Tag: emacs-24.2.91~79 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3fa1e84d43f401876db74e14c7b72f5190fc13b0;p=emacs.git Don't crash if internal-char-font is called on non-GUI frames. src/fontset.c (Finternal_char_font): Return nil on non-GUI frames. (Bug#11964) --- diff --git a/src/ChangeLog b/src/ChangeLog index 99abda8a884..ce272cc0b53 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-11-26 Eli Zaretskii + + * fontset.c (Finternal_char_font): Return nil on non-GUI frames. + (Bug#11964) + 2012-11-24 Paul Eggert Revert recent change for Bug#8855. diff --git a/src/fontset.c b/src/fontset.c index da745b31ca1..ed468d33a15 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -1879,6 +1879,8 @@ DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 2, 0, } if (! CHAR_VALID_P (c)) return Qnil; + if (!FRAME_WINDOW_P (f)) + return Qnil; face_id = FACE_FOR_CHAR (f, FACE_FROM_ID (f, face_id), c, pos, Qnil); face = FACE_FROM_ID (f, face_id); if (face->font)