vlc | branch: master | David Fuhrmann <[email protected]> | Sun Mar 
24 15:07:31 2013 +0100| [ee308e599cd4c2619ce003a47620bc22b666e496] | committer: 
David Fuhrmann

macosx: do registration of the log callback slightly later

This fixes mysterious interface crashes during startup, because of wrong / 
corrupt
initialization of several objects.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ee308e599cd4c2619ce003a47620bc22b666e496
---

 modules/gui/macosx/intf.m |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index edd8b71..c5fced6 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -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];

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to