diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2014-10-09 21:08:10 +0200 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2014-10-09 22:14:41 +0200 |
commit | 58f62891fa99c8d4d0ebfc9c719134af753366e2 (patch) | |
tree | 23baf647013b299e2ea4e0168ebf1eb8cf37d806 /video/out/cocoa_common.m | |
parent | ca353fcf9268fc4630143db21bd1b3e7c806b889 (diff) | |
download | mpv-58f62891fa99c8d4d0ebfc9c719134af753366e2.tar.bz2 mpv-58f62891fa99c8d4d0ebfc9c719134af753366e2.tar.xz |
cocoa: fix 'uninitalized' access
I think this doesn't make a difference, since in Objective-C nil responds as
a NullObject, but better not depend on this crappy language feature.
Diffstat (limited to 'video/out/cocoa_common.m')
-rw-r--r-- | video/out/cocoa_common.m | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index 7eabad53ba..d704706501 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -184,15 +184,13 @@ void vo_cocoa_uninit(struct vo *vo) [s->video release]; - // XXX: It looks like there are some circular retain cycles for the - // video view / video window that cause them to not be deallocated, - // This is a workaround to make the fullscreen window be released, - // but the retain cycle problems should be investigated. - if ([s->view isInFullScreenMode]) - [[s->view window] release]; - - [s->window release]; - s->window = nil; + if (!s->embedded) { + if ([s->view isInFullScreenMode]) + [[s->view window] release]; + + [s->window release]; + s->window = nil; + } }); } |