Revert "Revert "Check that inhibitor scene tree is not null""
This reverts commit 035bb99d67
.
Not checking `tree != NULL` result in a segfault if the surface doesn't have a
role (for example because it is a newly created surface)
Closes: https://github.com/djpohly/dwl/issues/359
This commit is contained in:
parent
a39a46c908
commit
803a9ba98d
2
dwl.c
2
dwl.c
|
@ -628,7 +628,7 @@ checkidleinhibitor(struct wlr_surface *exclude)
|
||||||
struct wlr_surface *surface = wlr_surface_get_root_surface(inhibitor->surface);
|
struct wlr_surface *surface = wlr_surface_get_root_surface(inhibitor->surface);
|
||||||
struct wlr_scene_tree *tree = surface->data;
|
struct wlr_scene_tree *tree = surface->data;
|
||||||
if (bypass_surface_visibility || (exclude != surface
|
if (bypass_surface_visibility || (exclude != surface
|
||||||
&& tree->node.enabled)) {
|
&& tree && tree->node.enabled)) {
|
||||||
inhibited = 1;
|
inhibited = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue