diff options
| author | Kenichi Handa | 2004-05-29 02:11:25 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2004-05-29 02:11:25 +0000 |
| commit | 3a7e2562220c500ded83510b28863b88a96a2e3e (patch) | |
| tree | d2dafa42cef88b1cc61d7e7cc42752d746edef45 /src | |
| parent | 0fdf26e604bd9fd88f654591c59f8088bf0dd143 (diff) | |
| download | emacs-3a7e2562220c500ded83510b28863b88a96a2e3e.tar.gz emacs-3a7e2562220c500ded83510b28863b88a96a2e3e.zip | |
(BUILD_GLYPH_STRINGS): Check if s is NULL.
(x_produce_glyphs): Fix setting of members of cmp in case
cmp->glyph_len is zero,
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 6e3fae75376..13fdd0d8c72 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -17923,8 +17923,11 @@ compute_overhangs_and_x (s, x, backward_p) | |||
| 17923 | abort (); \ | 17923 | abort (); \ |
| 17924 | } \ | 17924 | } \ |
| 17925 | \ | 17925 | \ |
| 17926 | set_glyph_string_background_width (s, START, LAST_X); \ | 17926 | if (s) \ |
| 17927 | (X) += s->width; \ | 17927 | { \ |
| 17928 | set_glyph_string_background_width (s, START, LAST_X); \ | ||
| 17929 | (X) += s->width; \ | ||
| 17930 | } \ | ||
| 17928 | } \ | 17931 | } \ |
| 17929 | } \ | 17932 | } \ |
| 17930 | while (0) | 17933 | while (0) |
| @@ -18819,7 +18822,12 @@ x_produce_glyphs (it) | |||
| 18819 | here we check only the font of the first glyph. This leads | 18822 | here we check only the font of the first glyph. This leads |
| 18820 | to incorrect display, but it's very rare, and C-l (recenter) | 18823 | to incorrect display, but it's very rare, and C-l (recenter) |
| 18821 | can correct the display anyway. */ | 18824 | can correct the display anyway. */ |
| 18822 | if (cmp->font != (void *) font) | 18825 | if (cmp->glyph_len == 0) |
| 18826 | { | ||
| 18827 | cmp->lbearing = cmp->rbearing = 0; | ||
| 18828 | cmp->pixel_width = cmp->ascent = cmp->descent = 0; | ||
| 18829 | } | ||
| 18830 | else if (cmp->font != (void *) font) | ||
| 18823 | { | 18831 | { |
| 18824 | /* Ascent and descent of the font of the first character of | 18832 | /* Ascent and descent of the font of the first character of |
| 18825 | this composition (adjusted by baseline offset). Ascent | 18833 | this composition (adjusted by baseline offset). Ascent |