]> git.sesse.net Git - vlc/commitdiff
macosx: do registration of the log callback slightly later
authorDavid Fuhrmann <david.fuhrmann@googlemail.com>
Sun, 24 Mar 2013 14:07:31 +0000 (15:07 +0100)
committerDavid Fuhrmann <david.fuhrmann@googlemail.com>
Sun, 24 Mar 2013 14:10:32 +0000 (15:10 +0100)
This fixes mysterious interface crashes during startup, because of wrong / corrupt
initialization of several objects.

modules/gui/macosx/intf.m

index edd8b7135caf5dbab5776e262905f359cc5f2aaa..c5fced6b33fc4a54bdfda436d9d7ac6c4121e1dd 100644 (file)
@@ -114,9 +114,6 @@ int OpenIntf (vlc_object_t *p_this)
 
     memset(p_intf->p_sys, 0, sizeof(*p_intf->p_sys));
 
-    /* subscribe to LibVLCCore's messages */
-    vlc_LogSet(p_this->p_libvlc, MsgCallback, NULL);
-
     Run(p_intf);
 
     [o_pool release];
@@ -281,6 +278,10 @@ static void Run(intf_thread_t *p_intf)
     o_plItemChangedLock = [[NSLock alloc] init];
 
     [[VLCMain sharedInstance] setIntf: p_intf];
+
+    /* subscribe to LibVLCCore's messages */
+    vlc_LogSet(p_intf->p_libvlc, MsgCallback, NULL);
+
     [NSBundle loadNibNamed: @"MainMenu" owner: NSApp];
 
     [NSApp run];