wined3d: Only clear "map_ptr" if the memory was unmapped in wined3d_allocator_chunk_vk_unmap().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2020-12-14 17:57:20 +03:30 committed by Alexandre Julliard
parent 46c7f66cf3
commit 4e7be88990
1 changed files with 4 additions and 2 deletions

View File

@ -277,7 +277,9 @@ void wined3d_allocator_chunk_vk_unmap(struct wined3d_allocator_chunk_vk *chunk_v
TRACE("chunk_vk %p, context_vk %p.\n", chunk_vk, context_vk); TRACE("chunk_vk %p, context_vk %p.\n", chunk_vk, context_vk);
if (!--chunk_vk->c.map_count) if (--chunk_vk->c.map_count)
return;
VK_CALL(vkUnmapMemory(device_vk->vk_device, chunk_vk->vk_memory)); VK_CALL(vkUnmapMemory(device_vk->vk_device, chunk_vk->vk_memory));
chunk_vk->c.map_ptr = NULL; chunk_vk->c.map_ptr = NULL;
} }