X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fcompositor.c;h=1f45a713957bdf9630bb7842490872e71fb081c5;hb=refs%2Fchanges%2F58%2F28258%2F4;hp=634c468aa1e14853152d9b8a7b0e9ee1308b64e1;hpb=924473ef016ba8dcfa863861740be2289421313d;p=src%2Fagl-compositor.git diff --git a/src/compositor.c b/src/compositor.c index 634c468..1f45a71 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -87,7 +87,8 @@ handle_output_destroy(struct wl_listener *listener, void *data) output = wl_container_of(listener, output, output_destroy); assert(output->output == data); - if (output->fullscreen_view.fs->view) { + if (output->fullscreen_view.fs && + output->fullscreen_view.fs->view) { weston_surface_destroy(output->fullscreen_view.fs->view->surface); output->fullscreen_view.fs->view = NULL; } @@ -487,8 +488,21 @@ head_disable(struct ivi_compositor *ivi, struct weston_head *head) weston_head_detach(head); if (count_heads(ivi_output->output) == 0) { - weston_output_disable(ivi_output->output); + if (ivi_output->output) { + /* ivi_output->output destruction may be deferred in + * some cases (see drm_output_destroy()), so we need to + * forcibly trigger the destruction callback now, or + * otherwise would later access data that we are about + * to free + */ + struct weston_output *save = ivi_output->output; + + handle_output_destroy(&ivi_output->output_destroy, save); + weston_output_destroy(save); + } } + wl_list_remove(&ivi_output->link); + free(ivi_output); } static struct weston_config_section * @@ -1816,7 +1830,12 @@ int wet_main(int argc, char *argv[], const struct weston_testsuite_data *test_da weston_compositor_wake(ivi.compositor); ivi_shell_create_global(&ivi); - ivi_launch_shell_client(&ivi); + + ivi_launch_shell_client(&ivi, "shell-client", + &ivi.shell_client.client); + ivi_launch_shell_client(&ivi, "shell-client-ext", + &ivi.shell_client_ext.client); + if (debug) ivi_screenshooter_create(&ivi); ivi_agl_systemd_notify(&ivi);