1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-19 21:31:52 +00:00

examples/cocoa: never instance NSApplication with new

Cocoa expects the you instance NSApplications only through the singleton
method sharedApplication.
This commit is contained in:
Stefano Pigozzi 2014-10-05 10:06:46 +02:00
parent 11609ab389
commit 3137b7ac5f

View File

@ -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];