diff --git a/core/vulkan/vk_virtual_swapchain/cc/swapchain.cpp b/core/vulkan/vk_virtual_swapchain/cc/swapchain.cpp index cf735845b1..f5b564c9e5 100644 --- a/core/vulkan/vk_virtual_swapchain/cc/swapchain.cpp +++ b/core/vulkan/vk_virtual_swapchain/cc/swapchain.cpp @@ -396,6 +396,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass( VkRenderPassCreateInfo intercepted = *pCreateInfo; std::vector attachments( pCreateInfo->attachmentCount); + intercepted.pAttachments = attachments.data(); for (size_t i = 0; i < pCreateInfo->attachmentCount; ++i) { attachments[i] = pCreateInfo->pAttachments[i];