From 6ef2d45a2d2fa91c18c653e2d25d3f291e1ecd90 Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Wed, 26 Jun 2019 07:47:50 +0200 Subject: [PATCH] ivi-layout: unmap desktop surfaces in ivi_view_destroy() weston_desktop_surface_unlink_view() does now call weston_view_destroy() so the weston_view is not destroyed here. This is a problem because the view remains in the weston_layer view_list. If ivi_view_destroy() is called from ivi_layout_surface_destroy() and the view list is rebuilt in the 'removed' signal, then the list gets corrupted when the view is destroyed immediately afterwards. Fix this by calling weston_view_destroy() unconditionally for all view. Signed-off-by: Michael Olbrich --- ivi-shell/ivi-layout.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c index 266a3962..7cec79d7 100644 --- a/ivi-shell/ivi-layout.c +++ b/ivi-shell/ivi-layout.c @@ -155,8 +155,7 @@ ivi_view_destroy(struct ivi_layout_view *ivi_view) if (weston_surface_is_desktop_surface(ivi_view->ivisurf->surface)) weston_desktop_surface_unlink_view(ivi_view->view); - else - weston_view_destroy(ivi_view->view); + weston_view_destroy(ivi_view->view); free(ivi_view); }