summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--x.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/x.c b/x.c
index ab59186..da5084b 100644
--- a/x.c
+++ b/x.c
@@ -760,12 +760,12 @@ xloadcols(void)
static int loaded;
Color *cp;
- dc.collen = MAX(LEN(colorname), 256);
- dc.col = xmalloc(dc.collen * sizeof(Color));
-
if (loaded) {
for (cp = dc.col; cp < &dc.col[dc.collen]; ++cp)
XftColorFree(xw.dpy, xw.vis, xw.cmap, cp);
+ } else {
+ dc.collen = MAX(LEN(colorname), 256);
+ dc.col = xmalloc(dc.collen * sizeof(Color));
}
for (i = 0; i < dc.collen; i++)