diff options
author | Dave Airlie <airliedfreedesktop.org> | 2006-03-23 04:13:37 +0000 |
---|---|---|
committer | Dave Airlie <airliedfreedesktop.org> | 2006-03-23 04:13:37 +0000 |
commit | eab896cc213157758d74a2f39b5e3b1e748c071f (patch) | |
tree | f91905adc3ba0ab6a79ad7aa507d321c82b3f7f9 /src/mesa/drivers/dri/common | |
parent | f756924fa59b53f4951e2f817144bcb5e5765535 (diff) |
fix coverity 926: use before NULL check
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index d7640759de..883a89c888 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -659,10 +659,12 @@ static void driDestroyDrawable(__DRInativeDisplay *dpy, void *drawablePrivate) { __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *) drawablePrivate; - __DRIscreenPrivate *psp = pdp->driScreenPriv; - int scrn = psp->myNum; + __DRIscreenPrivate *psp; + int scrn; if (pdp) { + psp = pdp->driScreenPriv; + scrn = psp->myNum; (*psp->DriverAPI.DestroyBuffer)(pdp); if ((*dri_interface->windowExists)(dpy, pdp->draw)) (void)(*dri_interface->destroyDrawable)(dpy, scrn, pdp->draw); |