summaryrefslogtreecommitdiff
path: root/weston-ivi-shell/src/ivi-controller-impl.c
diff options
context:
space:
mode:
Diffstat (limited to 'weston-ivi-shell/src/ivi-controller-impl.c')
-rw-r--r--weston-ivi-shell/src/ivi-controller-impl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/weston-ivi-shell/src/ivi-controller-impl.c b/weston-ivi-shell/src/ivi-controller-impl.c
index 8c89904..af79ded 100644
--- a/weston-ivi-shell/src/ivi-controller-impl.c
+++ b/weston-ivi-shell/src/ivi-controller-impl.c
@@ -165,6 +165,10 @@ send_surface_add_event(struct ivisurface *ivisurf,
for (i = 0; i < (int)length; i++) {
/* Send new surface event */
ivilayer = NULL;
+ if (wl_list_empty(&shell->list_layer)) {
+ break;
+ }
+
wl_list_for_each(ivilayer, &shell->list_layer, link) {
if (ivilayer->layout_layer == pArray[i]) {
break;