From: Pekka Paalanen <pekka.paala...@collabora.co.uk>

If we pass the base->enabled test, then the renderer output is
guaranteed to be there, so we can just destroy it.

Destroying it before unmap makes the sequence match better the enable
path.

Signed-off-by: Pekka Paalanen <pekka.paala...@collabora.co.uk>
---
 libweston/compositor-fbdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c
index 22100f98..b3136708 100644
--- a/libweston/compositor-fbdev.c
+++ b/libweston/compositor-fbdev.c
@@ -486,11 +486,9 @@ fbdev_output_disable_handler(struct weston_output *base)
        if (!base->enabled)
                return 0;
 
+       pixman_renderer_output_destroy(&output->base);
        fbdev_frame_buffer_unmap(output);
 
-       if (base->renderer_state != NULL)
-               pixman_renderer_output_destroy(base);
-
        return 0;
 }
 
-- 
2.13.5

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to