From 3b4ae1ccce0adb13dbb5f263cbb0922cd586752d Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Fri, 14 Apr 2000 19:36:35 +0000 Subject: [PATCH] (xpm_load) [DEBUG_X_COLORS]: Register colors. --- src/xfns.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/xfns.c b/src/xfns.c index 9bc400627ec..edd718b6b89 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -6536,7 +6536,12 @@ xpm_load (f, img) img->colors = (unsigned long *) xmalloc (img->ncolors * sizeof *img->colors); for (i = 0; i < attrs.nalloc_pixels; ++i) - img->colors[i] = attrs.alloc_pixels[i]; + { + img->colors[i] = attrs.alloc_pixels[i]; +#ifdef DEBUG_X_COLORS + register_color (img->colors[i]); +#endif + } img->width = attrs.width; img->height = attrs.height; -- 2.39.5