Commit 965a0bb5 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fixed potential race condition

items stored in a xib should only interacted with after its loaded, which may be after NSApp is
(cherry picked from commit 1de6f934)
parent 243c1fb6
...@@ -650,6 +650,13 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -650,6 +650,13 @@ static VLCMain *_o_sharedMainInstance = nil;
[[VLCApplication sharedApplication] setApplicationIconImage: [NSImage imageNamed:@"vlc-xmas"]]; [[VLCApplication sharedApplication] setApplicationIconImage: [NSImage imageNamed:@"vlc-xmas"]];
} }
[o_mainwindow updateWindow];
[o_mainwindow updateTimeSlider];
[o_mainwindow updateVolumeSlider];
[o_mainwindow makeKeyAndOrderFront: self];
[self initStrings];
nib_main_loaded = TRUE; nib_main_loaded = TRUE;
} }
...@@ -659,11 +666,6 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -659,11 +666,6 @@ static VLCMain *_o_sharedMainInstance = nil;
[self updateCurrentlyUsedHotkeys]; [self updateCurrentlyUsedHotkeys];
[o_mainwindow updateWindow];
[o_mainwindow updateTimeSlider];
[o_mainwindow updateVolumeSlider];
[o_mainwindow makeKeyAndOrderFront: self];
/* init media key support */ /* init media key support */
b_mediaKeySupport = var_InheritBool( VLCIntf, "macosx-mediakeys" ); b_mediaKeySupport = var_InheritBool( VLCIntf, "macosx-mediakeys" );
if( b_mediaKeySupport ) if( b_mediaKeySupport )
...@@ -686,7 +688,6 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -686,7 +688,6 @@ static VLCMain *_o_sharedMainInstance = nil;
/* we will need this, so let's load it here so the interface appears to be more responsive */ /* we will need this, so let's load it here so the interface appears to be more responsive */
nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner: NSApp]; nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner: NSApp];
[self initStrings];
} }
- (void)initStrings - (void)initStrings
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment