aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/dri2/dri2.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-06-16 07:38:57 +0000
committermarha <marha@users.sourceforge.net>2010-06-16 07:38:57 +0000
commit4d5476d24bec19c71aced4ac2b320d1110fb5363 (patch)
treee4539765cbf5fe27b543055192bdac0118e07382 /xorg-server/hw/xfree86/dri2/dri2.c
parent35eba169d63276fc4c5692c51615a509f8572545 (diff)
parent2a31e38d82566c4f93773ecf9c79f2cc9abef169 (diff)
downloadvcxsrv-4d5476d24bec19c71aced4ac2b320d1110fb5363.tar.gz
vcxsrv-4d5476d24bec19c71aced4ac2b320d1110fb5363.tar.bz2
vcxsrv-4d5476d24bec19c71aced4ac2b320d1110fb5363.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/hw/xfree86/dri2/dri2.c')
-rw-r--r--xorg-server/hw/xfree86/dri2/dri2.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/xorg-server/hw/xfree86/dri2/dri2.c b/xorg-server/hw/xfree86/dri2/dri2.c
index bb1be358b..123bc3225 100644
--- a/xorg-server/hw/xfree86/dri2/dri2.c
+++ b/xorg-server/hw/xfree86/dri2/dri2.c
@@ -957,8 +957,12 @@ Bool
DRI2Connect(ScreenPtr pScreen, unsigned int driverType, int *fd,
const char **driverName, const char **deviceName)
{
- DRI2ScreenPtr ds = DRI2GetScreen(pScreen);
+ DRI2ScreenPtr ds;
+
+ if (!dixPrivateKeyRegistered(dri2ScreenPrivateKey))
+ return FALSE;
+ ds = DRI2GetScreen(pScreen);
if (ds == NULL || driverType >= ds->numDrivers ||
!ds->driverNames[driverType])
return FALSE;