changeset 90308:5b7fa3a2f66c

(x_draw_composite_glyph_string_foreground): Check s->face is NULL or not.
author Kenichi Handa <handa@m17n.org>
date Tue, 21 Feb 2006 11:42:19 +0000
parents a2899387f787
children d863760fdf88
files src/xterm.c
diffstat 1 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Tue Feb 21 10:45:21 2006 +0000
+++ b/src/xterm.c	Tue Feb 21 11:42:19 2006 +0000
@@ -1368,7 +1368,7 @@
 
   /* If first glyph of S has a left box line, start drawing the text
      of S to the right of that box line.  */
-  if (s->face->box != FACE_NO_BOX
+  if (s->face && s->face->box != FACE_NO_BOX
       && s->first_glyph->left_box_line_p)
     x = s->x + abs (s->face->box_line_width);
   else
@@ -1390,17 +1390,18 @@
   else
     {
       for (i = 0; i < s->nchars; i++, ++s->gidx)
-	{
-	  XDrawString16 (s->display, s->window, s->gc,
-			 x + s->cmp->offsets[s->gidx * 2],
-			 s->ybase - s->cmp->offsets[s->gidx * 2 + 1],
-			 s->char2b + i, 1);
-	  if (s->face->overstrike)
+	if (s->face)
+	  {
 	    XDrawString16 (s->display, s->window, s->gc,
-			   x + s->cmp->offsets[s->gidx * 2] + 1,
+			   x + s->cmp->offsets[s->gidx * 2],
 			   s->ybase - s->cmp->offsets[s->gidx * 2 + 1],
 			   s->char2b + i, 1);
-	}
+	    if (s->face->overstrike)
+	      XDrawString16 (s->display, s->window, s->gc,
+			     x + s->cmp->offsets[s->gidx * 2] + 1,
+			     s->ybase - s->cmp->offsets[s->gidx * 2 + 1],
+			     s->char2b + i, 1);
+	  }
     }
 }