]> git.eshelyaron.com Git - emacs.git/commitdiff
(unload_color): Do nothing if PIXEL is -1.
authorGerd Moellmann <gerd@gnu.org>
Tue, 10 Jul 2001 12:20:02 +0000 (12:20 +0000)
committerGerd Moellmann <gerd@gnu.org>
Tue, 10 Jul 2001 12:20:02 +0000 (12:20 +0000)
src/xfaces.c

index d2d88ce5021809f2486c870c006b6ce0ac9cac48..7e1eb33521cd869a2c9e2bdeab500a148f7bed4e 100644 (file)
@@ -1631,9 +1631,12 @@ unload_color (f, pixel)
      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
 }