From 2d64e9bbb93a4fdb9b04951e124da032d8d40e6f Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Fri, 11 Jul 2008 08:53:44 +0000 Subject: [PATCH] [USE_MAC_TSM] (mac_handle_text_input_event): Check if FACE_FROM_ID returns NULL. --- src/ChangeLog | 19 +++++++++++++++++++ src/mactoolbox.c | 7 ++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0a9f3ec9a67..54f1fd65d29 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,22 @@ +2008-07-11 YAMAMOTO Mitsuharu + + * Makefile.in (frame.o, keyboard.o, xdisp.o, xfaces.o): + Depend on macgui.h. + + * macfns.c (Fx_server_version): Don't use gestaltSystemVersionMajor, + gestaltSystemVersionMinor, or gestaltSystemVersionBugFix. + + * macterm.c (keycode_to_xkeysym_table): Add entries for f17, f18, + and f19. + [MAC_OSX] (fn_keycode_to_keycode_table): Likewise. + + * macterm.h (gestaltSystemVersionMajor, gestaltSystemVersionMinor) + (gestaltSystemVersionBugFix) [MAC_OS_X_VERSION_MAX_ALLOWED < 1040]: + Remove enumerators. + + * mactoolbox.c [USE_MAC_TSM] (mac_handle_text_input_event): + Check if FACE_FROM_ID returns NULL. + 2008-07-07 Chong Yidong * image.c (png_load): Use correct bit-depth for setting background diff --git a/src/mactoolbox.c b/src/mactoolbox.c index 45a86135422..f470c517554 100644 --- a/src/mactoolbox.c +++ b/src/mactoolbox.c @@ -575,7 +575,7 @@ mac_handle_text_input_event (next_handler, event, data) 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 @@ mac_handle_text_input_event (next_handler, event, data) + 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; -- 2.11.4.GIT