dri: Fix potential null pointer deference in dri_put_drawable.

(cherry picked from commit 364070b1f2)
This commit is contained in:
Vinson Lee 2009-11-24 00:57:55 -05:00
parent 76b3523d75
commit f622b649fb

View file

@ -498,11 +498,11 @@ static void dri_put_drawable(__DRIdrawable *pdp)
{
__DRIscreenPrivate *psp;
pdp->refcount--;
if (pdp->refcount)
return;
if (pdp) {
pdp->refcount--;
if (pdp->refcount)
return;
psp = pdp->driScreenPriv;
(*psp->DriverAPI.DestroyBuffer)(pdp);
if (pdp->pClipRects) {