X-Git-Url: http://git.openbox.org/?p=dana%2Fxcompmgr.git;a=blobdiff_plain;f=xcompmgr.c;h=3d27786ea0a7b79ac0bca8368e2e878f1c7291c0;hp=7e542fea1f00edbc6e603e514eb0ed8aa74ec07e;hb=ed88a4746832f69e65d866d732eadb2070456806;hpb=7abdf973ea7e98a6d23c8d149b3d7a95409768f1;ds=inline diff --git a/xcompmgr.c b/xcompmgr.c index 7e542fe..3d27786 100644 --- a/xcompmgr.c +++ b/xcompmgr.c @@ -581,10 +581,30 @@ shadow_picture (Display *dpy, double opacity, Picture alpha_pict, int width, int shadowImage->width, shadowImage->height, 8); + if (!shadowPixmap) + { + XDestroyImage (shadowImage); + return None; + } + shadowPicture = XRenderCreatePicture (dpy, shadowPixmap, XRenderFindStandardFormat (dpy, PictStandardA8), 0, 0); + if (!shadowPicture) + { + XDestroyImage (shadowImage); + XFreePixmap (dpy, shadowPixmap); + return None; + } + gc = XCreateGC (dpy, shadowPixmap, 0, 0); + if (!gc) + { + XDestroyImage (shadowImage); + XFreePixmap (dpy, shadowPixmap); + XRenderFreePicture (dpy, shadowPicture); + return None; + } XPutImage (dpy, shadowPixmap, gc, shadowImage, 0, 0, 0, 0, shadowImage->width,