# HG changeset patch # User Kim F. Storm # Date 1161597529 0 # Node ID e3f2446cbade27d6868ec4636223b39a14f94dd6 # Parent f2ea221d11a207e57eae7aea1398ca71a1598f28 (remember_mouse_glyph): Don't crash if glyphs are not initialized. diff -r f2ea221d11a2 -r e3f2446cbade src/xdisp.c --- a/src/xdisp.c Mon Oct 23 09:51:56 2006 +0000 +++ b/src/xdisp.c Mon Oct 23 09:58:49 2006 +0000 @@ -2081,7 +2081,7 @@ int gx, gy; NativeRectangle *rect; { - Lisp_Object window; + Lisp_Object window = Qnil; struct window *w; struct glyph_row *r, *gr, *end_row; enum window_part part; @@ -2091,7 +2091,9 @@ /* Try to determine frame pixel position and size of the glyph under frame pixel coordinates X/Y on frame F. */ - window = window_from_coordinates (f, gx, gy, &part, &x, &y, 0); + if (f->glyphs_initialized_p) + window = window_from_coordinates (f, gx, gy, &part, &x, &y, 0); + if (NILP (window)) { width = FRAME_SMALLEST_CHAR_WIDTH (f);