compositor: Remove output from list in weston_output_destroy()
When destroying ouputs, they would sometimes be removed before the call
to weston_output_destory() and sometimes after, depending on the
backend. Now the output is remove withing that function so the behavior
is standard across all backends.
diff --git a/src/compositor.c b/src/compositor.c
index 8f4bdef..0e739e3 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -2996,6 +2996,8 @@
WL_EXPORT void
weston_output_destroy(struct weston_output *output)
{
+ wl_list_remove(&output->link);
+
wl_signal_emit(&output->destroy_signal, output);
free(output->name);