From 7be5990089d6f64bbec19e0378b512d54f5042f9 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 23 Jun 2026 08:59:16 -0700 Subject: [PATCH] Removed redundant check for VK_SUCCESS Fixes https://github.com/libsdl-org/SDL/issues/15157 --- src/gpu/vulkan/SDL_gpu_vulkan.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gpu/vulkan/SDL_gpu_vulkan.c b/src/gpu/vulkan/SDL_gpu_vulkan.c index 3b9efe5c45..24c9160ef3 100644 --- a/src/gpu/vulkan/SDL_gpu_vulkan.c +++ b/src/gpu/vulkan/SDL_gpu_vulkan.c @@ -10968,10 +10968,8 @@ static bool VULKAN_Submit( presentData->windowData->needsSwapchainRecreate = true; presentData->windowData->needsSurfaceRecreate = true; } else { - if (presentResult != VK_SUCCESS) { - VULKAN_INTERNAL_ReleaseCommandBuffer(vulkanCommandBuffer); - SDL_UnlockMutex(renderer->submitLock); - } + VULKAN_INTERNAL_ReleaseCommandBuffer(vulkanCommandBuffer); + SDL_UnlockMutex(renderer->submitLock); CHECK_VULKAN_ERROR_AND_RETURN(presentResult, vkQueuePresentKHR, false); }