macosx_events: fix crash when shutting down during window animations
This commit is contained in:
1 parent
ec0b5e527b
commit
4fd3af14cd
1 file changed
+3
-1
@@ -340,8 +340,10 @@ void cocoa_set_mpv_handle(struct mpv_handle *ctx)
|
||||
switch (event->event_id) {
|
||||
case MPV_EVENT_SHUTDOWN: {
|
||||
#if HAVE_MACOS_COCOA_CB
|
||||
if ([(Application *)NSApp cocoaCB].isShuttingDown)
|
||||
if ([(Application *)NSApp cocoaCB].isShuttingDown) {
|
||||
_ctx = nil;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
mpv_destroy(_ctx);
|
||||
_ctx = nil;
|
||||
|
||||
Reference in new issue
Block a user