]> code.delx.au - gnu-emacs/commitdiff
Fix crash in fontset-info
authorAndreas Schwab <schwab@linux-m68k.org>
Fri, 12 Jun 2015 19:09:23 +0000 (21:09 +0200)
committerAndreas Schwab <schwab@linux-m68k.org>
Fri, 12 Jun 2015 19:18:05 +0000 (21:18 +0200)
* src/fontset.c (Ffontset_info): Check that the RFONT-DEF elt is
non-nil.

src/fontset.c

index 97bdbcef5bf2ecb69cffff4d68d5c8ba86d479bd..5fc92feb130b344df91a8b7c55711d393e14fc6d 100644 (file)
@@ -1983,7 +1983,7 @@ format is the same as above.  */)
                  for (j = 0; j < ASIZE (val); j++)
                    {
                      elt = AREF (val, j);
-                     if (FONT_OBJECT_P (RFONT_DEF_OBJECT (elt)))
+                     if (!NILP (elt) && FONT_OBJECT_P (RFONT_DEF_OBJECT (elt)))
                        {
                          Lisp_Object font_object = RFONT_DEF_OBJECT (elt);
                          Lisp_Object slot, name;