fix crash when checkidleinhibitor

This commit is contained in:
DreamMaoMao 2024-08-28 21:45:54 +08:00
parent d34be5d545
commit f831e4b46a

4
dwl.c
View File

@ -657,8 +657,8 @@ checkidleinhibitor(struct wlr_surface *exclude)
wl_list_for_each(inhibitor, &idle_inhibit_mgr->inhibitors, link) {
struct wlr_surface *surface = wlr_surface_get_root_surface(inhibitor->surface);
struct wlr_scene_tree *tree = surface->data;
if (exclude != surface && (bypass_surface_visibility || (!tree
|| wlr_scene_node_coords(&tree->node, &unused_lx, &unused_ly)))) {
if (exclude != surface && (bypass_surface_visibility || (tree
&& wlr_scene_node_coords(&tree->node, &unused_lx, &unused_ly)))) {
inhibited = 1;
break;
}