aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2018-04-26 14:04:24 +0200
committerGuido Günther <agx@sigxcpu.org>2018-04-26 14:08:30 +0200
commitd81f0170a323d64b17461bfba5fd6e437e44dd89 (patch)
treef37c62ff42fb5f70307c654b2875108ec9699f8f
parentb1bd0e2557ad7b151fa10a6735f9f14ca3b3a368 (diff)
layer-shell: Don't crash when the compositor didn't find a suitable output
In that case it must have closed the surface.
-rw-r--r--types/wlr_layer_shell.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/types/wlr_layer_shell.c b/types/wlr_layer_shell.c
index c61556bf..61ab5c14 100644
--- a/types/wlr_layer_shell.c
+++ b/types/wlr_layer_shell.c
@@ -287,7 +287,9 @@ static void handle_wlr_surface_committed(struct wlr_surface *wlr_surface,
surface->added = true;
wlr_signal_emit_safe(&surface->shell->events.new_surface,
surface);
- assert(surface->output);
+ // either the compositor found a suitable output or it must
+ // have closed the surface
+ assert(surface->output || surface->closed);
}
if (surface->configured && wlr_surface_has_buffer(surface->surface) &&
!surface->mapped) {