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

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

Merge "libvulkan: add NULL check to DestroySwapchainKHR"

am: 55e4f912

Change-Id: I07b33309ac91d75535e0916315e98d5a1319c9b8
parents d05a784d 55e4f912
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;