aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl/drivers
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2016-08-16 13:24:48 +0100
committerEmil Velikov <[email protected]>2016-10-14 12:17:18 +0100
commit07690a289a60f9b12cde59affefeed9e05864dd7 (patch)
treebbc907458d17aefcc61f67adc9741fff01f454f3 /src/egl/drivers
parent8cf83f9c08a929547062a8ba105a3a75531d72a4 (diff)
egl/dri2: drop NULL checks prior to dri2_destroy_surface
The function already have the respective check within. Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/egl/drivers')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index cc10e604bbd..7fd05f99e3e 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++;