aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
Diffstat (limited to 'sway')
-rw-r--r--sway/tree/view.c3
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)) {