summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2014-10-05 10:06:46 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2014-10-05 10:06:46 +0200
commit3137b7ac5f98ac062c4a7df351f0836e52994b18 (patch)
treed852c3ae3ee4197799becafd728e896597ca8e67 /DOCS
parent11609ab389f3971c6dea051e0c834f664895c5f1 (diff)
downloadmpv-3137b7ac5f98ac062c4a7df351f0836e52994b18.tar.bz2
mpv-3137b7ac5f98ac062c4a7df351f0836e52994b18.tar.xz
examples/cocoa: never instance NSApplication with new
Cocoa expects the you instance NSApplications only through the singleton method sharedApplication.
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/client_api_examples/cocoabasic.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/DOCS/client_api_examples/cocoabasic.m b/DOCS/client_api_examples/cocoabasic.m
index 6095a084d6..383d778f3e 100644
--- a/DOCS/client_api_examples/cocoabasic.m
+++ b/DOCS/client_api_examples/cocoabasic.m
@@ -116,7 +116,7 @@ static void wakeup(void *context) {
// Delete this if you already have a main.m.
int main(int argc, const char * argv[]) {
@autoreleasepool {
- NSApplication *app = [NSApplication new];
+ NSApplication *app = [NSApplication sharedApplication];
AppDelegate *delegate = [AppDelegate new];
app.delegate = delegate;
[app run];