mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
export-dmabuf: Keep frame->output = NULL until frame is ready
This fixes a crash that happens when a client requests a frame on a backend that does not implement export_dmabuf. An assertion fails with the message: sway: types/wlr_output.c:777: wlr_output_lock_attach_render: Assertion `output->attach_render_locks > 0' failed.
This commit is contained in:
parent
32148808ad
commit
034384f5aa
1 changed files with 2 additions and 1 deletions
|
@ -98,7 +98,6 @@ static void manager_handle_capture_output(struct wl_client *client,
|
|||
return;
|
||||
}
|
||||
frame->manager = manager;
|
||||
frame->output = output;
|
||||
wl_list_init(&frame->output_precommit.link);
|
||||
|
||||
uint32_t version = wl_resource_get_version(manager_resource);
|
||||
|
@ -129,6 +128,8 @@ static void manager_handle_capture_output(struct wl_client *client,
|
|||
return;
|
||||
}
|
||||
|
||||
frame->output = output;
|
||||
|
||||
wlr_output_lock_attach_render(frame->output, true);
|
||||
if (overlay_cursor) {
|
||||
wlr_output_lock_software_cursors(frame->output, true);
|
||||
|
|
Loading…
Reference in a new issue