On Tue, Jan 28, 2014 at 01:54:16PM +0100, [email protected] wrote:
> From: Emilio Pozuelo Monfort <[email protected]>
> 
> Since commit 9046d2, when destroying a surface, we remove all the
> links from its children. But when the child surfaces are destroyed,
> those links will be removed again, but since they were not properly
> initialized, weston will crash.
> 
> Call shell_surface_set_parent instead which removes the link and
> sets parent while also initializing the link, thus avoiding this
> crash.

LGTM.  Patch builds against git, and make check passes without new
errors.

Reviewed-by: Bryce Harrington <[email protected]>
Tested-by: Bryce Harrington <[email protected]>

> ---
>  desktop-shell/shell.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
> index c275543..111a7aa 100644
> --- a/desktop-shell/shell.c
> +++ b/desktop-shell/shell.c
> @@ -2927,10 +2927,8 @@ destroy_shell_surface(struct shell_surface *shsurf)
>       weston_view_destroy(shsurf->view);
>  
>       wl_list_remove(&shsurf->children_link);
> -     wl_list_for_each_safe(child, next, &shsurf->children_list, 
> children_link) {
> -             wl_list_remove(&child->children_link);
> -             child->parent = NULL;
> -     }
> +     wl_list_for_each_safe(child, next, &shsurf->children_list, 
> children_link)
> +             shell_surface_set_parent(child, NULL);
>  
>       wl_list_remove(&shsurf->link);
>       free(shsurf);
> -- 
> 1.8.5.3
> 
> _______________________________________________
> wayland-devel mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to