mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-15 02:37:52 +00:00
gpu/vulkan: Move dereference after null check
(cherry picked from commit 03d0c2ad74)
This commit is contained in:
parent
ad2b211f75
commit
8c1daf0caf
1 changed files with 4 additions and 1 deletions
|
|
@ -9521,7 +9521,8 @@ static SDL_GPUCommandBuffer *VULKAN_AcquireCommandBuffer(
|
|||
VulkanCommandBuffer *commandBuffer =
|
||||
VULKAN_INTERNAL_GetInactiveCommandBufferFromPool(renderer, threadID);
|
||||
|
||||
commandBuffer->descriptorSetCache = VULKAN_INTERNAL_AcquireDescriptorSetCache(renderer);
|
||||
DescriptorSetCache *descriptorSetCache =
|
||||
VULKAN_INTERNAL_AcquireDescriptorSetCache(renderer);
|
||||
|
||||
SDL_UnlockMutex(renderer->acquireCommandBufferLock);
|
||||
|
||||
|
|
@ -9529,6 +9530,8 @@ static SDL_GPUCommandBuffer *VULKAN_AcquireCommandBuffer(
|
|||
return NULL;
|
||||
}
|
||||
|
||||
commandBuffer->descriptorSetCache = descriptorSetCache;
|
||||
|
||||
// Reset state
|
||||
|
||||
commandBuffer->currentComputePipeline = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue