dri: Fix potential null pointer dereference in driBindContext.

(cherry picked from commit 919898e92f)
This commit is contained in:
Vinson Lee 2009-11-28 23:22:31 -05:00
parent f622b649fb
commit c994f08eb1

View file

@ -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) {