mirror of
https://github.com/labwc/labwc.git
synced 2026-04-10 08:21:07 -04:00
layer-shell: null check surface before configure
...to avoid crash during node/surface destruction. No crash has been observed, so this is merely a preventative measure.
This commit is contained in:
parent
fbb92e2e30
commit
49a21692cb
1 changed files with 4 additions and 0 deletions
|
|
@ -45,6 +45,10 @@ arrange_one_layer(const struct wlr_box *full_area, struct wlr_box *usable_area,
|
||||||
struct wlr_scene_node *node;
|
struct wlr_scene_node *node;
|
||||||
wl_list_for_each(node, &tree->children, link) {
|
wl_list_for_each(node, &tree->children, link) {
|
||||||
struct lab_layer_surface *surface = node_layer_surface_from_node(node);
|
struct lab_layer_surface *surface = node_layer_surface_from_node(node);
|
||||||
|
/* Surface could be null during destruction */
|
||||||
|
if (!surface) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
struct wlr_scene_layer_surface_v1 *scene = surface->scene_layer_surface;
|
struct wlr_scene_layer_surface_v1 *scene = surface->scene_layer_surface;
|
||||||
if (!scene->layer_surface->initialized) {
|
if (!scene->layer_surface->initialized) {
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue