desktop-shell: shell_surfaces always have a layer

There is no way for shell_surface_calculate_layer_link() to give us a
NULL layer, so don't pretend it can and silently drop out without
removing it from the old layer.

Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Daniel Stone 2022-06-21 20:12:35 +01:00
parent 2f2e20f3a3
commit 5ff5d0ea90

View file

@ -1716,9 +1716,8 @@ shell_surface_update_layer(struct shell_surface *shsurf)
struct weston_layer_entry *new_layer_link;
new_layer_link = shell_surface_calculate_layer_link(shsurf);
assert(new_layer_link);
if (new_layer_link == NULL)
return;
if (new_layer_link == &shsurf->view->layer_link)
return;