ivi-layout: clear on_layer when layer_destroy
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 <wataru_natsume@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index e3452d2..4142694 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -914,6 +914,7 @@
&ivilayer->order.surface_list, order.link) {
wl_list_remove(&surface_link->order.link);
wl_list_init(&surface_link->order.link);
+ surface_link->on_layer = NULL;
}
}