summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>2017-09-13 17:22:38 +0300
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2017-10-04 16:18:06 +0300
commit61e5a2727a0625a7f082ced749b6d41f88ea84e3 (patch)
tree152e955f60def98ca50eb76206e84a6123d5af13
parenta51e71fbf0b3b1faceca2fb1272728177c56951d (diff)
compositor-fbdev: always destroy renderer-output on disable
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.paalanen@collabora.co.uk> Reviewed-by: Ian Ray <ian.ray@ge.com> Acked-by Daniel Stone <daniels@collabora.com>
-rw-r--r--libweston/compositor-fbdev.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c
index 01ee18f0..8a3ce0de 100644
--- a/libweston/compositor-fbdev.c
+++ b/libweston/compositor-fbdev.c
@@ -485,11 +485,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;
}