summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-06-07 21:49:43 -0700
committerKeith Packard <keithp@keithp.com>2010-06-07 21:49:43 -0700
commitb3a7b229e1e1f212bdd185af5443311091824005 (patch)
tree090f0787a525e3330b450b25eac9fd1b0bac34e7 /hw
parentf7af00e9f0e0e1d854b0e882378c032518ab71ca (diff)
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>
Diffstat (limited to 'hw')
-rw-r--r--hw/xfree86/dri/dristruct.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/xfree86/dri/dristruct.h b/hw/xfree86/dri/dristruct.h
index fc929c2f9..a834bbff7 100644
--- a/hw/xfree86/dri/dristruct.h
+++ b/hw/xfree86/dri/dristruct.h
@@ -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, \