1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
$NetBSD: patch-ac,v 1.2 1998/08/07 10:40:38 agc Exp $
--- c_gpr.c.orig Wed Jul 29 12:05:16 1992
+++ c_gpr.c Mon Jul 27 22:29:01 1998
@@ -300,12 +300,12 @@
pallocated = 0;
if (!success) {
- XFreeColors(d, cmap, pixels, dallocated, 0);
+ if (pixels) XFreeColors(d, cmap, pixels, dallocated, 0);
if (!opt->defaultcolormap) {
cmap = XCreateColormap(d, root, visual, AllocNone);
pallocated = writecolormap(&success);
if (!success) {
- XFreeColors(d, cmap, pixels, pallocated, 0);
+ if (pixels) XFreeColors(d, cmap, pixels, pallocated, 0);
XFreeColormap(d, cmap);
}
}
|