all repos — openbox @ c2bb32dcd1539796f0c8da49d3df3468553ad256

openbox fork - make it a bit more like ryudo

dont fux self in color_free if the color is NULL
Dana Jansens danakj@orodu.net
commit

c2bb32dcd1539796f0c8da49d3df3468553ad256

parent

fd5784c082de724b9ccde01977eac1e27a121201

1 files changed, 6 insertions(+), 4 deletions(-)

jump to
M render/color.crender/color.c

@@ -58,9 +58,11 @@ /*XXX same color could be pointed to twice, this might have to be a refcount*/

void color_free(color_rgb *c) { - if (c->gc != None) - XFreeGC(ob_display, c->gc); - g_free(c); + if (c != NULL) { + if (c->gc != None) + XFreeGC(ob_display, c->gc); + g_free(c); + } } void reduce_depth(pixel32 *data, XImage *im)

@@ -87,7 +89,7 @@ }

data += im->width; p32 += im->width; } - } else im->data = data; + } else im->data = (char*) data; break; case 16: for (y = 0; y < im->height; y++) {