[vlc-commits] macosx: fix main menu initialization order on startup

David Fuhrmann git at videolan.org
Sat Mar 21 21:02:50 CET 2015


vlc/vlc-2.2 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sat Mar 21 18:30:21 2015 +0100| [d89dd67a5c2fb48b2264684b33ee024b82beb50b] | committer: David Fuhrmann

macosx: fix main menu initialization order on startup

MainMenus p_intf can be already accessed before
applicationWillFinishLaunching was called.

This should fix quite some crashes reported by the users.

(cherry picked from commit 34e54feea7de9f75e6b2085df4a12235a516571a)
Signed-off-by: David Fuhrmann <dfuhrmann at videolan.org>

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

 modules/gui/macosx/MainMenu.m |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/MainMenu.m b/modules/gui/macosx/MainMenu.m
index 2cd8901..8dd02b8 100644
--- a/modules/gui/macosx/MainMenu.m
+++ b/modules/gui/macosx/MainMenu.m
@@ -140,12 +140,12 @@ static VLCMainMenu *_o_sharedInstance = nil;
     }
 
     [self setRateControlsEnabled:NO];
+
+    p_intf = VLCIntf;
 }
 
 - (void)applicationWillFinishLaunching:(NSNotification *)o_notification
 {
-    p_intf = VLCIntf;
-
     NSString* o_key;
     playlist_t *p_playlist;
     vlc_value_t val;



More information about the vlc-commits mailing list