# HG changeset patch # User Kenichi Handa # Date 1085796685 0 # Node ID 0fb6df41f5a179345c136902ef15346be383f710 # Parent 713a4f4140ca98f5f9d4918c93955fb17ec74ac5 (BUILD_GLYPH_STRINGS): Check if s is NULL. (x_produce_glyphs): Fix setting of members of cmp in case cmp->glyph_len is zero, diff -r 713a4f4140ca -r 0fb6df41f5a1 src/xdisp.c --- 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