diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index 466f807cbf..3c2f4261d9 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -211,9 +211,10 @@ void vo_cocoa_uninit(struct vo *vo) [s->gl_ctx release]; [s->view removeFromSuperview]; [s->view release]; - if (s->window) [s->window release]; - - [NSApp setActivationPolicy:NSApplicationActivationPolicyAccessory]; + if (s->window) { + [s->window release]; + [NSApp setActivationPolicy:NSApplicationActivationPolicyAccessory]; + } }); }