changeset 35228:ae27a81ee8dc

(x_free_colors, x_free_dpy_colors): Do the unregister_colors before calling XFreeColors.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 11 Jan 2001 12:49:00 +0000
parents 4e7249135902
children 0412bc78ee11
files src/xfaces.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfaces.c	Thu Jan 11 10:18:42 2001 +0000
+++ b/src/xfaces.c	Thu Jan 11 12:49:00 2001 +0000
@@ -701,11 +701,11 @@
      necessary and some servers don't allow it.  So don't do it.  */
   if (class != StaticColor && class != StaticGray && class != TrueColor)
     {
-      XFreeColors (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f),
-		   pixels, npixels, 0);
 #ifdef DEBUG_X_COLORS
       unregister_colors (pixels, npixels);
 #endif
+      XFreeColors (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f),
+		   pixels, npixels, 0);
     }
 }
 
@@ -729,10 +729,10 @@
      necessary and some servers don't allow it.  So don't do it.  */
   if (class != StaticColor && class != StaticGray && class != TrueColor)
     {
-      XFreeColors (dpy, cmap, pixels, npixels, 0);
 #ifdef DEBUG_X_COLORS
       unregister_colors (pixels, npixels);
 #endif
+      XFreeColors (dpy, cmap, pixels, npixels, 0);
     }
 }