summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>2014-05-26 10:52:57 +0900
committerNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>2014-05-28 19:53:09 +0900
commit5dcfd1a719b12c71237129cafb7612dc830edea0 (patch)
tree42370f8e6872832ff9695d28e570551664a32393
parent2163411de835dc931bd5bc34677663af49906c92 (diff)
downloadweston-5dcfd1a719b12c71237129cafb7612dc830edea0.tar.gz
Fix seg-fault during a test-application running.
-rw-r--r--ivi-shell/ivi-layout.c8
-rw-r--r--ivi-shell/ivi-shell.c3
2 files changed, 6 insertions, 5 deletions
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index ae947c65..af84eb63 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -349,6 +349,9 @@ remove_orderlayer_from_screen(struct ivi_layout_layer *ivilayer)
if (!wl_list_empty(&link_scrn->link)) {
wl_list_remove(&link_scrn->link);
}
+ if (!wl_list_empty(&link_scrn->link_to_screen)) {
+ wl_list_remove(&link_scrn->link_to_screen);
+ }
free(link_scrn);
}
wl_list_init(&ivilayer->list_screen);
@@ -838,6 +841,7 @@ commit_list_layer(struct ivi_layout *layout)
wl_list_insert(&ivilayer->order.list_surface,
&ivisurf->order.link);
add_ordersurface_to_layer(ivisurf, ivilayer);
+ ivisurf->event_mask = IVI_NOTIFICATION_ADD;
}
}
}
@@ -869,6 +873,7 @@ commit_list_screen(struct ivi_layout *layout)
wl_list_insert(&iviscrn->order.list_layer,
&ivilayer->order.link);
add_orderlayer_to_screen(ivilayer, iviscrn);
+ ivilayer->event_mask = IVI_NOTIFICATION_ADD;
}
iviscrn->event_mask = 0;
}
@@ -1956,7 +1961,7 @@ ivi_layout_layerSetRenderOrder(struct ivi_layout_layer *ivilayer,
for (i = 0; i < number; i++) {
id_surface = &pSurface[i]->id_surface;
- wl_list_for_each(ivisurf, &layout->list_surface, link) {
+ wl_list_for_each_safe(ivisurf, next, &layout->list_surface, pending.link) {
if (*id_surface != ivisurf->id_surface) {
continue;
}
@@ -2630,7 +2635,6 @@ ivi_layout_surfaceSetNativeContent(struct weston_surface *surface,
}
wl_list_remove(&ivisurf->surface_destroy_listener.link);
- weston_view_destroy(ivisurf->view);
ivisurf->surface = NULL;
ivisurf->view = NULL;
diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c
index fac0c4e9..52463c08 100644
--- a/ivi-shell/ivi-shell.c
+++ b/ivi-shell/ivi-shell.c
@@ -132,15 +132,12 @@ static void
surface_destroy(struct wl_client *client, struct wl_resource *resource)
{
struct ivi_shell_surface *ivisurf = wl_resource_get_user_data(resource);
-
if (ivisurf != NULL) {
ivisurf->surface->configure = NULL;
ivisurf->surface->configure_private = NULL;
ivisurf->surface = NULL;
ivi_layout->surfaceSetNativeContent(NULL, 0, 0, ivisurf->id_surface);
}
-
- wl_resource_destroy(resource);
}
static const struct ivi_surface_interface surface_implementation = {