Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 55e4f912 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "libvulkan: add NULL check to DestroySwapchainKHR"

parents a2a7195e d78c2e8a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -723,6 +723,8 @@ void DestroySwapchainKHR(VkDevice device,
                         const VkAllocationCallbacks* allocator) {
    const auto& dispatch = GetData(device).driver;
    Swapchain* swapchain = SwapchainFromHandle(swapchain_handle);
    if (!swapchain)
        return;
    bool active = swapchain->surface.swapchain_handle == swapchain_handle;
    ANativeWindow* window = active ? swapchain->surface.window.get() : nullptr;