]> git.sesse.net Git - vlc/commitdiff
Mac OS X gui: checkForUpdate may not run on first thread. Hence alloc an autorelease...
authorPierre d'Herbemont <pdherbemont@videolan.org>
Tue, 27 Mar 2007 23:53:28 +0000 (23:53 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Tue, 27 Mar 2007 23:53:28 +0000 (23:53 +0000)
modules/gui/macosx/update.m

index 39f974583906926b7b4d2e9f3c80c3eb462c7294..1db80f7d6aa5da5609db07d816576776cdd3e983 100644 (file)
@@ -136,6 +136,9 @@ static VLCUpdate *_o_sharedInstance = nil;
 
 - (void)checkForUpdate
 {
+    /* We may not run on first thread */
+    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
     p_u = update_New( p_intf );
     update_Check( p_u, VLC_FALSE );
     update_iterator_t *p_uit = update_iterator_New( p_u );
@@ -267,6 +270,7 @@ static VLCUpdate *_o_sharedInstance = nil;
             msg_Warn( p_intf, "retrieving current release notes failed!" );
         }
     }
+    [pool release];
 }
 
 - (void)performDownload:(NSString *)path