summaryrefslogtreecommitdiff
path: root/Xext/xprint.c
diff options
context:
space:
mode:
Diffstat (limited to 'Xext/xprint.c')
-rw-r--r--Xext/xprint.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Xext/xprint.c b/Xext/xprint.c
index d8fc51713..4ac13e6d1 100644
--- a/Xext/xprint.c
+++ b/Xext/xprint.c
@@ -1944,8 +1944,11 @@ ProcXpPutDocumentData(ClientPtr client)
if (stuff->drawable) {
if (pContext->state & DOC_RAW_STARTED)
return BadDrawable;
- pDraw = (DrawablePtr)LookupDrawable(stuff->drawable, client);
- if (!pDraw || pDraw->pScreen->myNum != pContext->screenNum)
+ result = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
+ DixUnknownAccess);
+ if (result != Success)
+ return result;
+ if (pDraw->pScreen->myNum != pContext->screenNum)
return BadDrawable;
} else {
if (pContext->state & DOC_COOKED_STARTED)