diff options
author | Kenny Levinsen <kl@kl.wtf> | 2021-03-24 00:49:13 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-03-24 00:55:15 +0100 |
commit | d79ea9a0db11abbdad1e751326a06d6d48332f07 (patch) | |
tree | 42040af03199951dfaafd0b3ed4dfcd16d236468 | |
parent | 03daa53a0ef63d2a72acda05e94e5ba5c0b50d33 (diff) |
view: subsurface NULL check in view_from_wlr_surface
Necessary NULL checks had been added to xdg_shell and xwayland surfaces,
but subsurfaces had been missed.
-rw-r--r-- | sway/tree/view.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index 395b9fac..c762fa22 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -1157,6 +1157,9 @@ struct sway_view *view_from_wlr_surface(struct wlr_surface *wlr_surface) { if (wlr_surface_is_subsurface(wlr_surface)) { struct wlr_subsurface *subsurface = wlr_subsurface_from_wlr_surface(wlr_surface); + if (subsurface == NULL) { + return NULL; + } return view_from_wlr_surface(subsurface->parent); } if (wlr_surface_is_layer_surface(wlr_surface)) { |