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
This commit is contained in:
der richter 2024-10-13 13:58:19 +02:00
parent 23e774d514
commit 9a1c637e9e
1 changed files with 1 additions and 0 deletions

View File

@ -262,6 +262,7 @@ class CocoaCB: Common, EventSubscriber {
uninit()
uninitCommon()
window = nil
layer?.lockCglContext()
libmpv.uninit()