diff options
| author | Kim F. Storm | 2006-10-23 09:58:49 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2006-10-23 09:58:49 +0000 |
| commit | 4fa93fa8596baeb9d9f42942417bc99fd602b88b (patch) | |
| tree | 8f58377bac39b291c5cf20b074273a462f585789 | |
| parent | a4614668b42cdf5b707df387f7b6011a5554273e (diff) | |
| download | emacs-4fa93fa8596baeb9d9f42942417bc99fd602b88b.tar.gz emacs-4fa93fa8596baeb9d9f42942417bc99fd602b88b.zip | |
(remember_mouse_glyph): Don't crash if glyphs are not initialized.
| -rw-r--r-- | src/xdisp.c | 6 |
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) | |||
| 2081 | int gx, gy; | 2081 | int gx, gy; |
| 2082 | NativeRectangle *rect; | 2082 | NativeRectangle *rect; |
| 2083 | { | 2083 | { |
| 2084 | Lisp_Object window; | 2084 | Lisp_Object window = Qnil; |
| 2085 | struct window *w; | 2085 | struct window *w; |
| 2086 | struct glyph_row *r, *gr, *end_row; | 2086 | struct glyph_row *r, *gr, *end_row; |
| 2087 | enum window_part part; | 2087 | enum window_part part; |
| @@ -2091,7 +2091,9 @@ remember_mouse_glyph (f, gx, gy, rect) | |||
| 2091 | /* Try to determine frame pixel position and size of the glyph under | 2091 | /* Try to determine frame pixel position and size of the glyph under |
| 2092 | frame pixel coordinates X/Y on frame F. */ | 2092 | frame pixel coordinates X/Y on frame F. */ |
| 2093 | 2093 | ||
| 2094 | window = window_from_coordinates (f, gx, gy, &part, &x, &y, 0); | 2094 | if (f->glyphs_initialized_p) |
| 2095 | window = window_from_coordinates (f, gx, gy, &part, &x, &y, 0); | ||
| 2096 | |||
| 2095 | if (NILP (window)) | 2097 | if (NILP (window)) |
| 2096 | { | 2098 | { |
| 2097 | width = FRAME_SMALLEST_CHAR_WIDTH (f); | 2099 | width = FRAME_SMALLEST_CHAR_WIDTH (f); |