[vulkan] Fix what looks like a thinko

It looked like the code would have deleted a replacement swapchain
instead of the one being replaced.
This commit is contained in:
Bill Currie 2021-03-24 12:04:09 +09:00
parent a0d47de439
commit 51d6ec7c8c

View file

@ -245,7 +245,7 @@ Vulkan_CreateSwapchain (vulkan_ctx_t *ctx)
free (ctx->swapchain);
}
ctx->swapchain = QFV_CreateSwapchain (ctx, old_swapchain);
if (ctx->swapchain->swapchain == old_swapchain) {
if (old_swapchain && ctx->swapchain->swapchain != old_swapchain) {
ctx->device->funcs->vkDestroySwapchainKHR (ctx->device->dev,
old_swapchain, 0);
}