X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fgrab-ximage.c;h=49e7a8e7d0fca228119fec6fc56ea958c645b0ee;hp=f57bd9aa5436ce770f78dbb13cc93db0c785d5f7;hb=d6b0217f2417bd19187f0ebc389d6c5c2233b11c;hpb=aa75c7476aeaa84cf3abc192b376a8b03c325213 diff --git a/hacks/glx/grab-ximage.c b/hacks/glx/grab-ximage.c index f57bd9aa..49e7a8e7 100644 --- a/hacks/glx/grab-ximage.c +++ b/hacks/glx/grab-ximage.c @@ -159,10 +159,10 @@ convert_ximage_to_rgba32 (Screen *screen, XImage *image) */ XImage *from = image; XImage *to = XCreateImage (dpy, visual, 32, /* depth */ - ZPixmap, 0, 0, from->width, from->height + 2, + ZPixmap, 0, 0, from->width, from->height, 32, /* bitmap pad */ 0); - to->data = (char *) calloc (to->height, to->bytes_per_line); + to->data = (char *) calloc (to->height + 2, to->bytes_per_line); /* Set the bit order in the XImage structure to whatever the local host's native bit order is. @@ -735,7 +735,7 @@ load_texture_async_cb (Screen *screen, Window window, Drawable drawable, if (geometry->width <= 0 || geometry->height <= 0) { /* This can happen if an old version of xscreensaver-getimage - is installed. */ + is installed. Or if we have no image (checkerboard). */ geometry->x = 0; geometry->y = 0; geometry->width = dd.pix_width;