summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/common
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2009-11-28 23:22:31 -0500
committerVinson Lee <[email protected]>2009-11-28 23:22:31 -0500
commit919898e92fa23ff71a59d86a46ff0886a6f34e4d (patch)
tree13a39b9bf1b41aa230054330af0ab7ef1d2d0c17 /src/mesa/drivers/dri/common
parenta11d60d14caf8efc07f70af63b57b33273f8cf9b (diff)
dri: Fix potential null pointer dereference in driBindContext.
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index 439f66a7b88..da81ec9de51 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -167,11 +167,12 @@ static int driBindContext(__DRIcontext *pcp,
__DRIdrawable *pdp,
__DRIdrawable *prp)
{
- __DRIscreenPrivate *psp = pcp->driScreenPriv;
+ __DRIscreenPrivate *psp;
/* Bind the drawable to the context */
if (pcp) {
+ psp = pcp->driScreenPriv;
pcp->driDrawablePriv = pdp;
pcp->driReadablePriv = prp;
if (pdp) {