aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/xfaces.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xfaces.c b/src/xfaces.c
index 254aaf275f1..738acbd915c 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -339,7 +339,7 @@ unload_font (f, font)
339 BLOCK_INPUT; 339 BLOCK_INPUT;
340 /* Invalidate any computed faces which use this font, 340 /* Invalidate any computed faces which use this font,
341 and free their GC's if they have any. */ 341 and free their GC's if they have any. */
342 for (i = 0; i < len; i++) 342 for (i = 2; i < len; i++)
343 { 343 {
344 struct face *face = FRAME_COMPUTED_FACES (f)[i]; 344 struct face *face = FRAME_COMPUTED_FACES (f)[i];
345 if (face->font == font) 345 if (face->font == font)
@@ -348,6 +348,7 @@ unload_font (f, font)
348 if (face->gc) 348 if (face->gc)
349 XFreeGC (dpy, face->gc); 349 XFreeGC (dpy, face->gc);
350 face->gc = 0; 350 face->gc = 0;
351 /* This marks the computed face as available to reuse. */
351 face->font = 0; 352 face->font = 0;
352 } 353 }
353 } 354 }
@@ -402,7 +403,7 @@ unload_color (f, pixel)
402 BLOCK_INPUT; 403 BLOCK_INPUT;
403 /* Invalidate any computed faces which use this color, 404 /* Invalidate any computed faces which use this color,
404 and free their GC's if they have any. */ 405 and free their GC's if they have any. */
405 for (i = 0; i < len; i++) 406 for (i = 2; i < len; i++)
406 { 407 {
407 struct face *face = FRAME_COMPUTED_FACES (f)[i]; 408 struct face *face = FRAME_COMPUTED_FACES (f)[i];
408 if (face->foreground == pixel 409 if (face->foreground == pixel
@@ -412,6 +413,7 @@ unload_color (f, pixel)
412 if (face->gc) 413 if (face->gc)
413 XFreeGC (dpy, face->gc); 414 XFreeGC (dpy, face->gc);
414 face->gc = 0; 415 face->gc = 0;
416 /* This marks the computed face as available to reuse. */
415 face->font = 0; 417 face->font = 0;
416 } 418 }
417 } 419 }