mirror of https://github.com/mpv-player/mpv
macosx_events: fix crash when shutting down during window animations
This commit is contained in:
parent
ec0b5e527b
commit
4fd3af14cd
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue