diff options
author | Tadeo Kondrak <me@tadeo.ca> | 2020-03-04 14:47:26 -0700 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-03-10 10:59:05 +0100 |
commit | 91c0ffd6cf1ffb6a86c3ce4d6365ab0843ad9c37 (patch) | |
tree | 9c438ab491a9bcb57425289c87edd7db7007aa87 /sway | |
parent | fafc060909d7e7d971468f9de7015ca349a37052 (diff) |
Null check sway_layer_surface when checking damage
Before this change, an overlay layer-shell surface without a buffer
attached would segfault the compositor on screen damage.
Diffstat (limited to 'sway')
-rw-r--r-- | sway/desktop/output.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index ec3d6424..e6ed9be0 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -388,6 +388,9 @@ bool output_has_opaque_overlay_layer_surface(struct sway_output *output) { struct wlr_surface *wlr_surface = wlr_layer_surface_v1->surface; struct sway_layer_surface *sway_layer_surface = layer_from_wlr_layer_surface_v1(wlr_layer_surface_v1); + if (sway_layer_surface == NULL) { + continue; + } pixman_box32_t output_box = { .x2 = output->width, .y2 = output->height, |