From 07690a289a60f9b12cde59affefeed9e05864dd7 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Tue, 16 Aug 2016 13:24:48 +0100 Subject: egl/dri2: drop NULL checks prior to dri2_destroy_surface The function already have the respective check within. Signed-off-by: Emil Velikov --- src/egl/drivers/dri2/egl_dri2.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/egl/drivers') diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index cc10e60..7fd05f9 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -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++; -- cgit v1.1