summaryrefslogtreecommitdiff
path: root/sent.c
diff options
context:
space:
mode:
Diffstat (limited to 'sent.c')
-rw-r--r--sent.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sent.c b/sent.c
index a52b315..87e2a2d 100644
--- a/sent.c
+++ b/sent.c
@@ -277,6 +277,9 @@ ffprepare(Image *img)
if (depth < 24)
die("sent: Display color depths < 24 not supported");
+ if (img->ximg)
+ XDestroyImage(img->ximg);
+
if (!(img->ximg = XCreateImage(xw.dpy, CopyFromParent, depth, ZPixmap, 0,
NULL, width, height, 32, 0)))
die("sent: Unable to create XImage");