gpu/vulkan: Move dereference after null check

This commit is contained in:
Luis Caceres authored and Ethan Lee committed 2025-09-08 12:19:53 -04:00
1 parent 901a524d0d
commit 03d0c2ad74
1 file changed
+4 -1
+4 -1
View File
@@ -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;