Commit 963589ee authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

winex11.drv: Check if the surface is in list in wine_vk_surface_release().

Fixes a regression introduced by 6dcaff42. Signed-off-by: 's avatarPaul Gofman <pgofman@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent f183f8f9
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment