xserver: Branch 'master'

Keith Packard keithp at kemper.freedesktop.org
Tue Jun 15 15:25:27 PDT 2010


 hw/xfree86/dri2/dri2.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 505724c5f3e4fc1475fa54f20d08c0c06fb32443
Author: Keith Packard <keithp at keithp.com>
Date:   Mon Jun 7 16:28:34 2010 -0700

    In DRI2Connect, check to see if DRI2 has been initialized (bug 28424)
    
    This prevents DRI2GetScreen from being invoked with an uninitialized
    private key which would cause an assert failure.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>
    Tested-by: David Ronis <David.Ronis at McGill.CA>

diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index 27d8e25..a8dedfa 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/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;


More information about the xorg-commit mailing list