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

Commit b31ad5e5 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:...

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

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