aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan Bockgård2012-01-09 17:44:18 +0800
committerChong Yidong2012-01-09 17:44:18 +0800
commit1ba94341834d2846ca3bde3e5c1154fb365b7360 (patch)
tree64ba0109696553cd0d1d6fa1a0fafe1971f9f6d6 /src
parent3f235eece06afee170bf143cfde2ca8702384e75 (diff)
downloademacs-1ba94341834d2846ca3bde3e5c1154fb365b7360.tar.gz
emacs-1ba94341834d2846ca3bde3e5c1154fb365b7360.zip
Avoid crash on composition (backport from trunk).
* xdisp.c (fill_composite_glyph_string): Always set s->face, to avoid a crash (bug#9496).
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xdisp.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index fcaff20727d..7cfb3aa61e1 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12011-11-11 Johan Bockgård <bojohan@gnu.org>
2
3 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
4 avoid a crash (bug#9496).
5
12012-01-09 Chong Yidong <cyd@gnu.org> 62012-01-09 Chong Yidong <cyd@gnu.org>
2 7
3 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var. 8 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
diff --git a/src/xdisp.c b/src/xdisp.c
index c0c11bf02d2..ca61947be8b 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -19635,6 +19635,12 @@ fill_composite_glyph_string (s, base_face, overlaps)
19635 } 19635 }
19636 s->cmp_to = i; 19636 s->cmp_to = i;
19637 19637
19638 if (s->face == NULL)
19639 {
19640 s->face = base_face->ascii_face;
19641 s->font = s->face->font;
19642 }
19643
19638 /* All glyph strings for the same composition has the same width, 19644 /* All glyph strings for the same composition has the same width,
19639 i.e. the width set for the first component of the composition. */ 19645 i.e. the width set for the first component of the composition. */
19640 s->width = s->first_glyph->pixel_width; 19646 s->width = s->first_glyph->pixel_width;