Mercurial > emacs
changeset 89941:0fb6df41f5a1
(BUILD_GLYPH_STRINGS): Check if s is NULL.
(x_produce_glyphs): Fix setting of members of cmp in case
cmp->glyph_len is zero,
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Sat, 29 May 2004 02:11:25 +0000 |
parents | 713a4f4140ca |
children | 9cb747ae49af |
files | src/xdisp.c |
diffstat | 1 files changed, 11 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xdisp.c Sat May 29 01:02:16 2004 +0000 +++ b/src/xdisp.c Sat May 29 02:11:25 2004 +0000 @@ -17923,8 +17923,11 @@ abort (); \ } \ \ - set_glyph_string_background_width (s, START, LAST_X); \ - (X) += s->width; \ + if (s) \ + { \ + set_glyph_string_background_width (s, START, LAST_X); \ + (X) += s->width; \ + } \ } \ } \ while (0) @@ -18819,7 +18822,12 @@ here we check only the font of the first glyph. This leads to incorrect display, but it's very rare, and C-l (recenter) can correct the display anyway. */ - if (cmp->font != (void *) font) + if (cmp->glyph_len == 0) + { + cmp->lbearing = cmp->rbearing = 0; + cmp->pixel_width = cmp->ascent = cmp->descent = 0; + } + else if (cmp->font != (void *) font) { /* Ascent and descent of the font of the first character of this composition (adjusted by baseline offset). Ascent