Commit 536d8335 authored by eucan's avatar eucan Committed by Pekka Paalanen

ivi-shell: simplify ivi_layout_remove_surface

It is not necessary check the ivi-id of pregiven objects (layer or
surface). Traversing the list of all objects is sure to find the exact
same pointer we start with, bugs aside.

The controller modules are responsible for providing valid pointers. We
cannot protect from invalid pointers anyway.
Signed-off-by: eucan's avatarEmre Ucan <>
[Pekka: commit message]
Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <>
parent 5cbf1e81
......@@ -2214,22 +2214,13 @@ static void
ivi_layout_layer_remove_surface(struct ivi_layout_layer *ivilayer,
struct ivi_layout_surface *remsurf)
struct ivi_layout_surface *ivisurf = NULL;
struct ivi_layout_surface *next = NULL;
if (ivilayer == NULL || remsurf == NULL) {
weston_log("ivi_layout_layer_remove_surface: invalid argument\n");
wl_list_for_each_safe(ivisurf, next,
&ivilayer->pending.surface_list, {
if (ivisurf->id_surface == remsurf->id_surface) {
ivilayer->order.dirty = 1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment