]> code.delx.au - gnu-emacs/commitdiff
* xfaces.c (Fset_face_attribute_internal): Don't free the frame's
authorJim Blandy <jimb@redhat.com>
Sun, 23 May 1993 20:01:34 +0000 (20:01 +0000)
committerJim Blandy <jimb@redhat.com>
Sun, 23 May 1993 20:01:34 +0000 (20:01 +0000)
normal_gc or reverse_gc.

src/xfaces.c

index 5638ed65d5f587d0bbda16f0af54c1854cd55cc5..4c053f663fa67b3599df53300bb93ade99e13ccd 100644 (file)
@@ -903,7 +903,9 @@ DEFUN ("set-face-attribute-internal", Fset_face_attribute_internal,
   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 @@ DEFUN ("set-face-attribute-internal", Fset_face_attribute_internal,
   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;