From 30a7ac224fe64611fbccb665606aea44eefc48b9 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Tue, 10 Jul 2001 12:20:02 +0000 Subject: [PATCH] (unload_color): Do nothing if PIXEL is -1. --- src/xfaces.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/xfaces.c b/src/xfaces.c index d2d88ce5021..7e1eb33521c 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -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 } -- 2.39.2