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
|
@ -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…
Reference in New Issue