changeset 106215:da3ca3481c0b

(font_open_entity): Don't use ASET if font_object is Qnil.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Tue, 24 Nov 2009 08:37:32 +0000
parents 8653ee602137
children 63bf64653ed3
files src/font.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/font.c	Tue Nov 24 07:47:45 2009 +0000
+++ b/src/font.c	Tue Nov 24 08:37:32 2009 +0000
@@ -3007,7 +3007,8 @@
     return Qnil;
 
   font_object = driver_list->driver->open (f, entity, scaled_pixel_size);
-  ASET (font_object, FONT_SIZE_INDEX, make_number (pixel_size));
+  if (!NILP (font_object))
+    ASET (font_object, FONT_SIZE_INDEX, make_number (pixel_size));
   FONT_ADD_LOG ("open", entity, font_object);
   if (NILP (font_object))
     return Qnil;