mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
fix coverity 926: use before NULL check
This commit is contained in:
parent
f756924fa5
commit
eab896cc21
1 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue