summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2006-10-23 09:58:49 +0000
committerKim F. Storm <storm@cua.dk>2006-10-23 09:58:49 +0000
commitccbb23dd3a60388b5f8237cff3237eb131e6ce56 (patch)
tree69146985823ef238d4b12ab4a57179ed4d3f3121 /src
parentbf9e9d66ebc9e907c828f7ff28bd6d905703df53 (diff)
downloademacs-ccbb23dd3a60388b5f8237cff3237eb131e6ce56.tar.gz
(remember_mouse_glyph): Don't crash if glyphs are not initialized.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 875d12a4816..cf508288616 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -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);