From: Kenichi Handa <handa@m17n.org>
Date: Wed, 14 May 2008 12:28:17 +0000 (+0000)
Subject: (font_clear_cache): Check if the cached vector of entities is nil
X-Git-Tag: emacs-pretest-23.0.90~5535
X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=be9442ad0322d715edbe1ecad8e28ab9701288b6;p=emacs.git

(font_clear_cache): Check if the cached vector of entities is nil
or not.
---

diff --git a/src/ChangeLog b/src/ChangeLog
index 223356eaad2..1b897b8403b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,6 +1,8 @@
 2008-05-14  Kenichi Handa  <handa@m17n.org>
 
 	* font.c (font_prop_validate): Make nil a valid value.
+	(font_clear_cache): Check if the cached vector of entities is nil
+	or not.
 
 2008-05-14  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
diff --git a/src/font.c b/src/font.c
index c5cf732bfe9..107426e6d6f 100644
--- a/src/font.c
+++ b/src/font.c
@@ -2237,7 +2237,7 @@ font_clear_cache (f, cache, driver)
   for (tail = XCDR (XCDR (cache)); CONSP (tail); tail = XCDR (tail))
     {
       elt = XCAR (tail);
-      if (CONSP (elt) && FONT_SPEC_P (XCAR (elt)))
+      if (CONSP (elt) && FONT_SPEC_P (XCAR (elt)) && VECTORP (XCDR (elt)))
 	{
 	  Lisp_Object vec = XCDR (elt);
 	  int i;