changeset 80606:557c72d63824

[USE_MAC_TSM] (mac_handle_text_input_event): Check if FACE_FROM_ID returns NULL.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Fri, 11 Jul 2008 08:53:33 +0000
parents 7f7efbea2334
children cbe66f60fa69
files src/mactoolbox.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/mactoolbox.c	Fri Jul 11 08:53:20 2008 +0000
+++ b/src/mactoolbox.c	Fri Jul 11 08:53:33 2008 +0000
@@ -575,7 +575,7 @@
 	    int hpos, vpos, x, y;
 	    struct glyph_row *row;
 	    struct glyph *glyph;
-	    XFontStruct *font;
+	    struct face *face;
 
 	    f = mac_focus_frame (&one_mac_display_info);
 	    w = XWINDOW (f->selected_window);
@@ -600,9 +600,10 @@
 		   + row->visible_height
 		   + f->top_pos + FRAME_OUTER_TO_INNER_DIFF_Y (f));
 
-	    font = FACE_FROM_ID (f, glyph->face_id)->font;
-	    if (font)
+	    face = FACE_FROM_ID (f, glyph->face_id);
+	    if (face && face->font)
 	      {
+		XFontStruct *font = face->font;
 		Fixed point_size = Long2Fix (font->mac_fontsize);
 		short height = row->visible_height;
 		short ascent = row->ascent;