Merge pull request #890 from agx/layer-shell-empty-output-crash

layer-shell: Fix crash when cursor is intially outside any output
This commit is contained in:
Drew DeVault 2018-04-26 14:31:35 +02:00 committed by GitHub
commit 93ebd33aa8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 3 deletions

View file

@ -288,7 +288,9 @@ static void handle_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) {