fix coverity 926: use before NULL check
This commit is contained in:
@@ -659,10 +659,12 @@ static void
|
|||||||
driDestroyDrawable(__DRInativeDisplay *dpy, void *drawablePrivate)
|
driDestroyDrawable(__DRInativeDisplay *dpy, void *drawablePrivate)
|
||||||
{
|
{
|
||||||
__DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *) drawablePrivate;
|
__DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *) drawablePrivate;
|
||||||
__DRIscreenPrivate *psp = pdp->driScreenPriv;
|
__DRIscreenPrivate *psp;
|
||||||
int scrn = psp->myNum;
|
int scrn;
|
||||||
|
|
||||||
if (pdp) {
|
if (pdp) {
|
||||||
|
psp = pdp->driScreenPriv;
|
||||||
|
scrn = psp->myNum;
|
||||||
(*psp->DriverAPI.DestroyBuffer)(pdp);
|
(*psp->DriverAPI.DestroyBuffer)(pdp);
|
||||||
if ((*dri_interface->windowExists)(dpy, pdp->draw))
|
if ((*dri_interface->windowExists)(dpy, pdp->draw))
|
||||||
(void)(*dri_interface->destroyDrawable)(dpy, scrn, pdp->draw);
|
(void)(*dri_interface->destroyDrawable)(dpy, scrn, pdp->draw);
|
||||||
|
Reference in New Issue
Block a user