summaryrefslogtreecommitdiff
path: root/xfixes
diff options
context:
space:
mode:
Diffstat (limited to 'xfixes')
-rw-r--r--xfixes/region.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/xfixes/region.c b/xfixes/region.c
index cc8f1a5ef..f9de52542 100644
--- a/xfixes/region.c
+++ b/xfixes/region.c
@@ -269,6 +269,9 @@ ProcXFixesCreateRegionFromPicture(ClientPtr client)
VERIFY_PICTURE(pPicture, stuff->picture, client, DixGetAttrAccess);
+ if (!pPicture->pDrawable)
+ return RenderErrBase + BadPicture;
+
switch (pPicture->clientClipType) {
case CT_PIXMAP:
pRegion = BitmapToRegion(pPicture->pDrawable->pScreen,
@@ -750,6 +753,9 @@ ProcXFixesSetPictureClipRegion(ClientPtr client)
VERIFY_PICTURE(pPicture, stuff->picture, client, DixSetAttrAccess);
VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, DixReadAccess);
+ if (!pPicture->pDrawable)
+ return RenderErrBase + BadPicture;
+
return SetPictureClipRegion(pPicture, stuff->xOrigin, stuff->yOrigin,
pRegion);
}