mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-04-26 16:00:48 +02:00
compositor: check wlsc_surface::link before accessing neighbors
Check that wlsc_surface::link is part of a list before assuming it is part of the compositor->surface_list list. The shell plugin may want to remove a surface from the compositor's surface list to hide it. Note, that the shell plugin cannot use wlsc_surface::link for its own purposes. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
parent
ebc598ebf0
commit
d503a0b318
1 changed files with 3 additions and 0 deletions
|
|
@ -313,6 +313,9 @@ wlsc_surface_damage_below(struct wlsc_surface *surface)
|
|||
{
|
||||
struct wlsc_surface *below;
|
||||
|
||||
if (wl_list_empty(&surface->link))
|
||||
return;
|
||||
|
||||
if (surface->link.next == &surface->compositor->surface_list)
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue