compositor: Destroy renderer in weston_compositor_shutdown()
Currently we destroy the renderer before the outputs are destroyed, but
that sometimes leads to an error since a reference to the renderer is
necessary in order to destroy a gl_renderer_output.
Since destroying the renderer is common among all backends, just move
that call into weston_compositor_shutdown() immediately after the
outputs being destroyed.
diff --git a/src/compositor.c b/src/compositor.c
index ff0f3ab..329ee49 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -3734,6 +3734,9 @@
wl_list_for_each_safe(output, next, &ec->output_list, link)
output->destroy(output);
+ if (ec->renderer)
+ ec->renderer->destroy(ec);
+
weston_binding_list_destroy_all(&ec->key_binding_list);
weston_binding_list_destroy_all(&ec->button_binding_list);
weston_binding_list_destroy_all(&ec->touch_binding_list);