Module: wine Branch: master Commit: 963589ee296ae90003dab3e8204766ab4e4c0045 URL: https://source.winehq.org/git/wine.git/?a=commit;h=963589ee296ae90003dab3e82...
Author: Paul Gofman pgofman@codeweavers.com Date: Tue Nov 9 17:43:31 2021 +0300
winex11.drv: Check if the surface is in list in wine_vk_surface_release().
Fixes a regression introduced by 6dcaff421f87a93efe18b2efe0ec64d94ed1d483.
Signed-off-by: Paul Gofman pgofman@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/winex11.drv/vulkan.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/winex11.drv/vulkan.c b/dlls/winex11.drv/vulkan.c index 4f6624b3db8..6f67d9a8a19 100644 --- a/dlls/winex11.drv/vulkan.c +++ b/dlls/winex11.drv/vulkan.c @@ -211,9 +211,12 @@ static void wine_vk_surface_release(struct wine_vk_surface *surface) if (InterlockedDecrement(&surface->ref)) return;
- EnterCriticalSection(&context_section); - list_remove(&surface->entry); - LeaveCriticalSection(&context_section); + if (surface->entry.next) + { + EnterCriticalSection(&context_section); + list_remove(&surface->entry); + LeaveCriticalSection(&context_section); + }
if (surface->window) XDestroyWindow(gdi_display, surface->window);