From b8d26761c1c9e241907c62b378a65e1196a25a79 Mon Sep 17 00:00:00 2001 From: hujianwei Date: Sun, 30 Oct 2022 02:35:48 +0000 Subject: [PATCH] Fix crash during subsurface destruction * subcompositor.c (ViewUnparent): Don't consider view as attached if there is no subcompositor. --- subcompositor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subcompositor.c b/subcompositor.c index 899736f..6718f71 100644 --- a/subcompositor.c +++ b/subcompositor.c @@ -1113,7 +1113,7 @@ ViewUnparent (View *child) attached = (ViewVisibilityState (child, &mapped) && mapped); - if (attached) + if (attached && child->subcompositor) { /* Init the damage region. */ pixman_region32_init (&damage); @@ -1178,7 +1178,7 @@ ViewUnparent (View *child) #endif } - if (attached) + if (attached && child->subcompositor) /* Finalize the damage region. */ pixman_region32_fini (&damage); }