From 925ab37385cb5f27f4420e6308bc18500c49e24b Mon Sep 17 00:00:00 2001 From: Caleb Cornett Date: Fri, 29 Sep 2023 20:55:10 -0500 Subject: [PATCH] vulkan: Fix crash when acquiring the swapchain texture of an unclaimed window --- src/Refresh_Driver_Vulkan.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Refresh_Driver_Vulkan.c b/src/Refresh_Driver_Vulkan.c index a3864b1..e64fcee 100644 --- a/src/Refresh_Driver_Vulkan.c +++ b/src/Refresh_Driver_Vulkan.c @@ -9756,6 +9756,11 @@ static Refresh_Texture* VULKAN_AcquireSwapchainTexture( VulkanPresentData *presentData; windowData = VULKAN_INTERNAL_FetchWindowData(windowHandle); + if (windowData == NULL) + { + return NULL; + } + swapchainData = windowData->swapchainData; /* Window is claimed but swapchain is invalid! */