changeset 38346:a86234ceb517

(unload_color): Do nothing if PIXEL is -1.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 10 Jul 2001 12:20:02 +0000
parents 3238db7bdfef
children efc03a2c216e
files src/xfaces.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfaces.c	Tue Jul 10 12:19:10 2001 +0000
+++ b/src/xfaces.c	Tue Jul 10 12:20:02 2001 +0000
@@ -1631,9 +1631,12 @@
      unsigned long pixel;
 {
 #ifdef HAVE_X_WINDOWS
-  BLOCK_INPUT;
-  x_free_colors (f, &pixel, 1);
-  UNBLOCK_INPUT;
+  if (pixel != -1)
+    {
+      BLOCK_INPUT;
+      x_free_colors (f, &pixel, 1);
+      UNBLOCK_INPUT;
+    }
 #endif
 }