mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
; Avoid assertion violations in 'font-match-p'
* src/font.c (font_match_p): Avoid assertion violations in 'font_encode_char' if FONT is not a font-object.
This commit is contained in:
parent
7f04e046fb
commit
6a4ca5e59b
1 changed files with 4 additions and 0 deletions
|
|
@ -2488,6 +2488,8 @@ font_match_p (Lisp_Object spec, Lisp_Object font)
|
|||
val2 = XCDR (val2);
|
||||
if (CONSP (val2))
|
||||
{
|
||||
if (! FONT_OBJECT_P (font))
|
||||
return 0;
|
||||
/* All characters in the list must be supported. */
|
||||
for (; CONSP (val2); val2 = XCDR (val2))
|
||||
{
|
||||
|
|
@ -2500,6 +2502,8 @@ font_match_p (Lisp_Object spec, Lisp_Object font)
|
|||
}
|
||||
else if (VECTORP (val2))
|
||||
{
|
||||
if (! FONT_OBJECT_P (font))
|
||||
return 0;
|
||||
/* At most one character in the vector must be supported. */
|
||||
for (i = 0; i < ASIZE (val2); i++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue