4 Jul
2023
4 Jul
'23
2:12 p.m.
On Tue Jul 4 19:02:44 2023 +0000, Rémi Bernon wrote:
This is also a bit unusual, I'd rather do: ```suggestion:-3+0 if (wws->wayland_surface->latest_window_buffer) wayland_shm_buffer_unref(wws->wayland_surface->latest_window_buffer); wayland_shm_buffer_ref((wws->wayland_surface->latest_window_buffer = shm_buffer)); ``` Or on separate lines if you prefer, but adding the ref count just next to the assignment. I guess this was maybe supposed to cover the case when `last == shm_buffer`, but as with the changes I suggested above you would still own a reference over then entire function it should be fine.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3234#note_37858