free XImage before creating a new one
ffprepare was allocating a new XImage but wasn't freeing the previously allocated one
This commit is contained in:
parent
2649e8d533
commit
c271dfb848
3
sent.c
3
sent.c
@ -270,6 +270,9 @@ ffprepare(Image *img)
|
|||||||
if (depth < 24)
|
if (depth < 24)
|
||||||
die("sent: Display color depths < 24 not supported");
|
die("sent: Display color depths < 24 not supported");
|
||||||
|
|
||||||
|
if (img->ximg)
|
||||||
|
XDestroyImage(img->ximg);
|
||||||
|
|
||||||
if (!(img->ximg = XCreateImage(xw.dpy, CopyFromParent, depth, ZPixmap, 0,
|
if (!(img->ximg = XCreateImage(xw.dpy, CopyFromParent, depth, ZPixmap, 0,
|
||||||
NULL, width, height, 32, 0)))
|
NULL, width, height, 32, 0)))
|
||||||
die("sent: Unable to create XImage");
|
die("sent: Unable to create XImage");
|
||||||
|
Loading…
Reference in New Issue
Block a user