remoting-plugin: Release and detach the head
This re-orders the disable/destroy shutdown sequence such that lookup_remoted_output(), in remoting_output_disable(), would find a remoting output. Otherwise, without this, lookup_remoted_output() wouldn't find a remoting output available when shutting down the compositor, ultimately leading to a crash. Signed-off-by: Marius Vlad <marius.vlad@collabora.com> (cherry picked from commit c3270e887bc07bb9c7d0e58e25d25e3a65145d2e)
This commit is contained in:
@@ -636,6 +636,8 @@ remoting_output_destroy(struct weston_output *output)
|
|||||||
struct remoted_output *remoted_output = lookup_remoted_output(output);
|
struct remoted_output *remoted_output = lookup_remoted_output(output);
|
||||||
struct weston_mode *mode, *next;
|
struct weston_mode *mode, *next;
|
||||||
|
|
||||||
|
weston_head_release(remoted_output->head);
|
||||||
|
|
||||||
wl_list_for_each_safe(mode, next, &output->mode_list, link) {
|
wl_list_for_each_safe(mode, next, &output->mode_list, link) {
|
||||||
wl_list_remove(&mode->link);
|
wl_list_remove(&mode->link);
|
||||||
free(mode);
|
free(mode);
|
||||||
@@ -650,7 +652,6 @@ remoting_output_destroy(struct weston_output *output)
|
|||||||
free(remoted_output->gst_pipeline);
|
free(remoted_output->gst_pipeline);
|
||||||
|
|
||||||
wl_list_remove(&remoted_output->link);
|
wl_list_remove(&remoted_output->link);
|
||||||
weston_head_release(remoted_output->head);
|
|
||||||
free(remoted_output->head);
|
free(remoted_output->head);
|
||||||
free(remoted_output);
|
free(remoted_output);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user