From 3043690756f5bd2e220e5457f835237869f33001 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 5 Nov 2012 07:45:54 +0100 Subject: [PATCH] cocoa_common: save vo struct earlier in the startup process This prevents a crash with -fs option. --- libvo/cocoa_common.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvo/cocoa_common.m b/libvo/cocoa_common.m index b220da8798..39d5d74b92 100644 --- a/libvo/cocoa_common.m +++ b/libvo/cocoa_common.m @@ -370,6 +370,7 @@ static int create_window(struct vo *vo, uint32_t d_width, uint32_t d_height, [s->window setAcceptsMouseMovedEvents:YES]; [s->glContext setView:glView]; [s->glContext makeCurrentContext]; + [s->window setVideoOutput:vo]; [NSApp setDelegate:s->window]; [s->window setDelegate:s->window]; @@ -477,7 +478,6 @@ int vo_cocoa_check_events(struct vo *vo) inMode:NSEventTrackingRunLoopMode dequeue:YES]; if (event == nil) return 0; - [s->window setVideoOutput:vo]; [NSApp sendEvent:event]; if (s->did_resize) {