mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-22 14:35:57 +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);
|
munmap(cast->simple_frame.data, cast->simple_frame.size);
|
||||||
cast->simple_frame.data = NULL;
|
cast->simple_frame.data = NULL;
|
||||||
// TODO: reuse this buffer unless we quit or error out
|
// TODO: reuse this buffer unless we quit or error out
|
||||||
wl_buffer_destroy(cast->simple_frame.buffer);
|
if (cast->quit || cast->err) {
|
||||||
cast->simple_frame.buffer = NULL;
|
wl_buffer_destroy(cast->simple_frame.buffer);
|
||||||
logprint(TRACE, "wlroots: frame destroyed");
|
cast->simple_frame.buffer = NULL;
|
||||||
|
logprint(TRACE, "wlroots: frame destroyed");
|
||||||
|
}
|
||||||
|
|
||||||
if (cast->quit || cast->err) {
|
if (cast->quit || cast->err) {
|
||||||
// TODO: revisit the exit condition (remove quit?)
|
// TODO: revisit the exit condition (remove quit?)
|
||||||
|
|
Loading…
Reference in a new issue