From bec9b34f545c1818506adab207bde24aa38c7779 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Tue, 3 May 2022 19:28:04 +1000 Subject: [PATCH] Vulkan/SwapChain: Fix crash on fullscreen toggle with Mac --- common/Vulkan/SwapChain.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/Vulkan/SwapChain.cpp b/common/Vulkan/SwapChain.cpp index f68a9c13f8..46f0c13822 100644 --- a/common/Vulkan/SwapChain.cpp +++ b/common/Vulkan/SwapChain.cpp @@ -78,6 +78,9 @@ static bool CreateMetalLayer(WindowInfo* wi) return false; } + // This needs to be retained, otherwise we double release below. + msgsend(layer, "retain"); + // [view setWantsLayer:YES] msgsend(view, "setWantsLayer:", YES);