From 9a1c637e9e8529985eef270601fd561a39d4713a Mon Sep 17 00:00:00 2001 From: der richter Date: Sun, 13 Oct 2024 13:58:19 +0200 Subject: [PATCH] cocoa-cb: fix race on shutdown and toggling fullscreen since commit 15c48f3 we were force to start drawing on the main queue again. this has several unintended side effects due to the nature of the main queue. in this case fullscreen event and shutdown event are executed out of order and fullscreening is done after shutdown, leading to accessing options that are already de-initialised. just nil the window on shutdown and make it impossible to fullscreen after shutdown. Fixes #14810 --- video/out/cocoa_cb_common.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/video/out/cocoa_cb_common.swift b/video/out/cocoa_cb_common.swift index 38540a2040..2ca844184c 100644 --- a/video/out/cocoa_cb_common.swift +++ b/video/out/cocoa_cb_common.swift @@ -262,6 +262,7 @@ class CocoaCB: Common, EventSubscriber { uninit() uninitCommon() + window = nil layer?.lockCglContext() libmpv.uninit()