Make DRI_SCREEN_PRIV just return NULL when DRI isn't initialized

The code relied upon the previous devPrivate implementation which
offered this convenience.

Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Keith Packard 2010-06-07 21:49:43 -07:00
parent f7af00e9f0
commit b3a7b229e1

View File

@ -62,7 +62,8 @@ struct _DRIContextPrivRec
};
#define DRI_SCREEN_PRIV(pScreen) ((DRIScreenPrivPtr) \
dixLookupPrivate(&(pScreen)->devPrivates, DRIScreenPrivKey))
(dixPrivateKeyRegistered(DRIScreenPrivKey) ? \
dixLookupPrivate(&(pScreen)->devPrivates, DRIScreenPrivKey) : NULL))
#define DRI_SCREEN_PRIV_FROM_INDEX(screenIndex) ((DRIScreenPrivPtr) \
dixLookupPrivate(&screenInfo.screens[screenIndex]->devPrivates, \