[vlc-commits] macosx: fixed potential race condition

Felix Paul Kühne git at videolan.org
Wed Aug 22 17:47:08 CEST 2012


vlc/vlc-2.0 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Aug 22 17:46:24 2012 +0200| [965a0bb5862afd9a4b9244aa1c2b2f19a49ac7a0] | committer: 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 1de6f93432e1be15cd58966f951f27fd543e9fb5)

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

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

diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 3bf85d0..d35b2c1 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -650,6 +650,13 @@ static VLCMain *_o_sharedMainInstance = nil;
             [[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;
 }
 
@@ -659,11 +666,6 @@ static VLCMain *_o_sharedMainInstance = nil;
 
     [self updateCurrentlyUsedHotkeys];
 
-    [o_mainwindow updateWindow];
-    [o_mainwindow updateTimeSlider];
-    [o_mainwindow updateVolumeSlider];
-    [o_mainwindow makeKeyAndOrderFront: self];
-
     /* init media key support */
     b_mediaKeySupport = var_InheritBool( VLCIntf, "macosx-mediakeys" );
     if( b_mediaKeySupport )
@@ -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 */
     nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner: NSApp];
-    [self initStrings];
 }
 
 - (void)initStrings



More information about the vlc-commits mailing list