summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2014-10-09 21:08:10 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2014-10-09 22:14:41 +0200
commit58f62891fa99c8d4d0ebfc9c719134af753366e2 (patch)
tree23baf647013b299e2ea4e0168ebf1eb8cf37d806 /video
parentca353fcf9268fc4630143db21bd1b3e7c806b889 (diff)
downloadmpv-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')
-rw-r--r--video/out/cocoa_common.m16
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;
+ }
});
}