From a68bc5f449960a907b316e96a348c8eed69756f5 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Tue, 15 Jan 2019 01:27:06 -0500 Subject: [PATCH] Do not damage view child when container is NULL In `view_child_damage`, do not damage the surface if it has been unmapped or if the container is NULL. --- sway/tree/view.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sway/tree/view.c b/sway/tree/view.c index 5371ee20..e65968c6 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -735,6 +735,9 @@ static void view_subsurface_create(struct sway_view *view, } static void view_child_damage(struct sway_view_child *child, bool whole) { + if (!child || !child->mapped || !child->view || !child->view->container) { + return; + } int sx, sy; child->impl->get_root_coords(child, &sx, &sy); desktop_damage_surface(child->surface,