mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-12-23 01:59:49 +01:00
Destroy wlr_buffer only on quit or error in wlr_screencast.c
This commit is contained in:
parent
68f9759a78
commit
e57beee43d
1 changed files with 5 additions and 3 deletions
|
@ -25,9 +25,11 @@ void xdpw_wlr_frame_free(struct xdpw_screencast_instance *cast) {
|
|||
munmap(cast->simple_frame.data, cast->simple_frame.size);
|
||||
cast->simple_frame.data = NULL;
|
||||
// TODO: reuse this buffer unless we quit or error out
|
||||
wl_buffer_destroy(cast->simple_frame.buffer);
|
||||
cast->simple_frame.buffer = NULL;
|
||||
logprint(TRACE, "wlroots: frame destroyed");
|
||||
if (cast->quit || cast->err) {
|
||||
wl_buffer_destroy(cast->simple_frame.buffer);
|
||||
cast->simple_frame.buffer = NULL;
|
||||
logprint(TRACE, "wlroots: frame destroyed");
|
||||
}
|
||||
|
||||
if (cast->quit || cast->err) {
|
||||
// TODO: revisit the exit condition (remove quit?)
|
||||
|
|
Loading…
Reference in a new issue