Re: [PATCH] ivi-layout : clear on_layer when layer_destroy

2016-04-12 Thread Pekka Paalanen
On Mon, 11 Apr 2016 21:34:52 +0900
Wataru Natsume  wrote:

> On_layer of ivi_layout_surface should be NULL in the layer_destroy.
> Previous code might access to removed ivilayer and cause SEGV.
> 
> Signed-off-by: Wataru Natsume 
> ---
>  ivi-shell/ivi-layout.c |1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
> index 5c0e8f4..23e3269 100644
> --- a/ivi-shell/ivi-layout.c
> +++ b/ivi-shell/ivi-layout.c
> @@ -973,6 +973,7 @@ clear_surface_order_list(struct ivi_layout_layer 
> *ivilayer)
> >order.surface_list, order.link) {
>   wl_list_remove(_link->order.link);
>   wl_list_init(_link->order.link);
> + surface_link->on_layer = NULL;
>   }
>  }
>  

Hi,

layer_destroy seems to be an immediate action as opposed to needing a
commit, so looks good. Pushed:
   48fbb54..7b3a52a  master -> master


Thanks,
pq


pgpaGkJ_JeMbK.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


[PATCH] ivi-layout : clear on_layer when layer_destroy

2016-04-11 Thread Wataru Natsume
On_layer of ivi_layout_surface should be NULL in the layer_destroy.
Previous code might access to removed ivilayer and cause SEGV.

Signed-off-by: Wataru Natsume 
---
 ivi-shell/ivi-layout.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index 5c0e8f4..23e3269 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -973,6 +973,7 @@ clear_surface_order_list(struct ivi_layout_layer *ivilayer)
  >order.surface_list, order.link) {
wl_list_remove(_link->order.link);
wl_list_init(_link->order.link);
+   surface_link->on_layer = NULL;
}
 }
 
-- 
1.7.9.5

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel