changeset 2981:c257860fda02

* xfaces.c (Fset_face_attribute_internal): Don't free the frame's normal_gc or reverse_gc.
author Jim Blandy <jimb@redhat.com>
date Sun, 23 May 1993 20:01:34 +0000
parents 654eebe93c27
children 44ed08628516
files src/xfaces.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfaces.c	Sun May 23 19:52:07 1993 +0000
+++ b/src/xfaces.c	Sun May 23 20:01:34 1993 +0000
@@ -903,7 +903,9 @@
   if (id == 0)
     {
       BLOCK_INPUT;
-      if (FRAME_DEFAULT_FACE (f)->gc != 0)
+      if (FRAME_DEFAULT_FACE (f)->gc != 0
+	  && FRAME_DEFAULT_FACE (f)->gc != f->display.x->normal_gc
+	  && FRAME_DEFAULT_FACE (f)->gc != f->display.x->reverse_gc)
 	XFreeGC (x_current_display, FRAME_DEFAULT_FACE (f)->gc);
       build_face (f, FRAME_DEFAULT_FACE (f));
       UNBLOCK_INPUT;
@@ -912,7 +914,9 @@
   if (id == 1)
     {
       BLOCK_INPUT;
-      if (FRAME_MODE_LINE_FACE (f)->gc != 0)
+      if (FRAME_MODE_LINE_FACE (f)->gc != 0
+	  && FRAME_MODE_LINE_FACE (f)->gc != f->display.x->normal_gc
+	  && FRAME_MODE_LINE_FACE (f)->gc != f->display.x->reverse_gc)
 	XFreeGC (x_current_display, FRAME_MODE_LINE_FACE (f)->gc);
       build_face (f, FRAME_MODE_LINE_FACE (f));
       UNBLOCK_INPUT;