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

Commit c148af22 authored by Daniel Koch's avatar Daniel Koch Committed by android-build-merger
Browse files

Merge "libvulkan: add NULL check to DestroySwapchainKHR" am: 55e4f912

am: f9312a16

Change-Id: I03c4d3ddfe78db575bed967ce01d30c5225ec1c7
parents 3fb5c68e f9312a16
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;