aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/randr/rroutput.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-29 09:50:56 +0200
committermarha <marha@users.sourceforge.net>2012-06-29 09:50:56 +0200
commitf6d1847eef027266daa0f75ee92ceb09698b2761 (patch)
tree7ce3418e8255a636034d90be862167046c06473d /xorg-server/randr/rroutput.c
parent67551627d34fff4a0fbe719bce33a3bacb55ccef (diff)
downloadvcxsrv-f6d1847eef027266daa0f75ee92ceb09698b2761.tar.gz
vcxsrv-f6d1847eef027266daa0f75ee92ceb09698b2761.tar.bz2
vcxsrv-f6d1847eef027266daa0f75ee92ceb09698b2761.zip
xkeyboard-config xserver pixman mesa git update 29 Jun 2012
Diffstat (limited to 'xorg-server/randr/rroutput.c')
-rw-r--r--xorg-server/randr/rroutput.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/xorg-server/randr/rroutput.c b/xorg-server/randr/rroutput.c
index 0890c55b5..fbd0e32b3 100644
--- a/xorg-server/randr/rroutput.c
+++ b/xorg-server/randr/rroutput.c
@@ -528,13 +528,13 @@ ProcRRSetOutputPrimary(ClientPtr client)
RROutputPtr output = NULL;
WindowPtr pWin;
rrScrPrivPtr pScrPriv;
- int rc;
+ int ret;
REQUEST_SIZE_MATCH(xRRSetOutputPrimaryReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
- if (rc != Success)
- return rc;
+ ret = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
+ if (ret != Success)
+ return ret;
if (stuff->output) {
VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess);
@@ -546,7 +546,8 @@ ProcRRSetOutputPrimary(ClientPtr client)
}
pScrPriv = rrGetScrPriv(pWin->drawable.pScreen);
- RRSetPrimaryOutput(pWin->drawable.pScreen, pScrPriv, output);
+ if (pScrPriv)
+ RRSetPrimaryOutput(pWin->drawable.pScreen, pScrPriv, output);
return Success;
}