From 018b82c01e642aae45dace95c5aae5d489e98853 Mon Sep 17 00:00:00 2001 From: emersion Date: Wed, 25 Apr 2018 00:42:19 +0100 Subject: render/egl: allow passing NULL to surface and image destructors --- backend/headless/output.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'backend/headless') diff --git a/backend/headless/output.c b/backend/headless/output.c index 4b748dbf..f71b4cdb 100644 --- a/backend/headless/output.c +++ b/backend/headless/output.c @@ -29,9 +29,7 @@ static bool output_set_custom_mode(struct wlr_output *wlr_output, int32_t width, refresh = HEADLESS_DEFAULT_REFRESH; } - if (output->egl_surface) { - wlr_egl_destroy_surface(&backend->egl, output->egl_surface); - } + wlr_egl_destroy_surface(&backend->egl, output->egl_surface); output->egl_surface = egl_create_surface(&backend->egl, width, height); if (output->egl_surface == EGL_NO_SURFACE) { -- cgit v1.2.3