egl/dri2: drop NULL checks prior to dri2_destroy_surface

The function already have the respective check within.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
Emil Velikov
2016-08-16 13:24:48 +01:00
committed by Emil Velikov
parent 8cf83f9c08
commit 07690a289a
+2 -4
View File
@@ -1291,10 +1291,8 @@ dri2_make_current(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf,
unbind = (cctx == NULL && ddraw == NULL && rdraw == NULL);
if (unbind || dri2_dpy->core->bindContext(cctx, ddraw, rdraw)) {
if (old_dsurf)
dri2_destroy_surface(drv, disp, old_dsurf);
if (old_rsurf)
dri2_destroy_surface(drv, disp, old_rsurf);
dri2_destroy_surface(drv, disp, old_dsurf);
dri2_destroy_surface(drv, disp, old_rsurf);
if (!unbind)
dri2_dpy->ref_count++;