Module: wine Branch: master Commit: 24ff5c2f5e800d805fabdc5bca6db546b5c8763e URL: https://gitlab.winehq.org/wine/wine/-/commit/24ff5c2f5e800d805fabdc5bca6db54...
Author: Zebediah Figura zfigura@codeweavers.com Date: Sun Jul 10 15:29:39 2022 -0500
wined3d: Clear the BO map_ptr in wined3d_bo_gl_unmap() even if the chunk is still mapped.
If we subsequently try to destroy it we will decrease the chunk map_count again, which is a reference counting error.
---
dlls/wined3d/context_gl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index 5292297bb85..52a75c3d5ea 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -2949,8 +2949,7 @@ static void wined3d_bo_gl_unmap(struct wined3d_bo_gl *bo, struct wined3d_context struct wined3d_allocator_chunk_gl *chunk_gl = wined3d_allocator_chunk_gl(bo->memory->chunk);
wined3d_allocator_chunk_gl_unmap(chunk_gl, context_gl); - if (!chunk_gl->c.map_ptr) - bo->b.map_ptr = NULL; + bo->b.map_ptr = NULL; return; }