# HG changeset patch # User YAMAMOTO Mitsuharu # Date 1215766413 0 # Node ID 557c72d638244a8448e8ce67400f3dfe56a9f95f # Parent 7f7efbea23342e230868f2ef7cf3d5a56ce7d1e2 [USE_MAC_TSM] (mac_handle_text_input_event): Check if FACE_FROM_ID returns NULL. diff -r 7f7efbea2334 -r 557c72d63824 src/mactoolbox.c --- 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;