From ae69a754244c4e475c8d2591772ca8e005071d83 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 18 Feb 2019 11:55:41 +0100 Subject: Update to 5.42 --- hacks/fireworkx.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'hacks/fireworkx.c') diff --git a/hacks/fireworkx.c b/hacks/fireworkx.c index faf3745..57ba128 100644 --- a/hacks/fireworkx.c +++ b/hacks/fireworkx.c @@ -571,11 +571,13 @@ static void resize(struct state *st) XSync(st->dpy, 0); if (st->xim) { - if (st->xim->data == (char *)st->palaka2) st->xim->data = NULL; + /* if (st->xim->data == (char *)st->palaka2) */ + st->xim->data = NULL; XDestroyImage(st->xim); XSync(st->dpy, 0); free(st->mem2); free(st->mem1); + st->xim = 0; } st->xim = XCreateImage(st->dpy, xwa.visual, xwa.depth, ZPixmap, 0, 0, st->width, st->height, 8, 0); @@ -841,6 +843,14 @@ fireworkx_free (Display *dpy, Window window, void *closure) free(st->mem1); free(st->fireshell_array->fpix); free(st->fireshell_array); + if (st->xim) { + st->xim->data = NULL; + XDestroyImage (st->xim); + } + if (st->light_map) free(st->light_map); + if (st->colors) free (st->colors); + XFreeGC (dpy, st->gc); + free(st); } static const char *fireworkx_defaults [] = -- cgit v1.2.3-55-g7522