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.
This commit is contained in:
Brian Ashworth 2019-01-15 01:27:06 -05:00 committed by emersion
parent 3087942c35
commit a68bc5f449

View file

@ -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) { 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; int sx, sy;
child->impl->get_root_coords(child, &sx, &sy); child->impl->get_root_coords(child, &sx, &sy);
desktop_damage_surface(child->surface, desktop_damage_surface(child->surface,