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@keithp.com> Tested-by: David Ronis <David.Ronis@McGill.CA>
This commit is contained in:
parent
68a9ee8370
commit
505724c5f3
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue