mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-15 06:59:43 -05:00
surface: fix destroyed subsurfaces handling
wlr_subsurface_from_wlr_surface can return NULL if the wl_surface is still alive and if the wl_subsurface has been destroyed. Make sure we check for NULL. Fixes https://github.com/swaywm/sway/issues/3195
This commit is contained in:
parent
eaa852ed77
commit
a5b8ea90d2
2 changed files with 11 additions and 5 deletions
|
|
@ -43,6 +43,10 @@ struct wlr_compositor *wlr_compositor_create(struct wl_display *display,
|
|||
|
||||
bool wlr_surface_is_subsurface(struct wlr_surface *surface);
|
||||
|
||||
/**
|
||||
* Get a subsurface from a surface. Can return NULL if the subsurface has been
|
||||
* destroyed.
|
||||
*/
|
||||
struct wlr_subsurface *wlr_subsurface_from_wlr_surface(
|
||||
struct wlr_surface *surface);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue