]> code.delx.au - gnu-emacs/commitdiff
(remember_mouse_glyph): Don't crash if glyphs are not initialized.
authorKim F. Storm <storm@cua.dk>
Mon, 23 Oct 2006 09:58:49 +0000 (09:58 +0000)
committerKim F. Storm <storm@cua.dk>
Mon, 23 Oct 2006 09:58:49 +0000 (09:58 +0000)
src/xdisp.c

index 875d12a48168e3b11482b25d2ebb076441962480..cf50828861640b2bc6d503c5a9c8bb8bf54ffc05 100644 (file)
@@ -2081,7 +2081,7 @@ remember_mouse_glyph (f, gx, gy, rect)
      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 @@ remember_mouse_glyph (f, gx, gy, rect)
   /* 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);