[vlc-commits] macosx: fix memleak, cosmetics

David Fuhrmann git at videolan.org
Sat May 24 10:20:43 CEST 2014


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sat May 24 09:08:53 2014 +0200| [b34dd4b02c8beacfedcc7e7beed692349d7115f3] | committer: David Fuhrmann

macosx: fix memleak, cosmetics

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

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

diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 199ddc1..8f46abb 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -991,8 +991,6 @@ static VLCMain *_o_sharedMainInstance = nil;
 
 - (void)application:(NSApplication *)o_app openFiles:(NSArray *)o_names
 {
-    char *psz_uri = vlc_path2uri([[o_names objectAtIndex:0] UTF8String], NULL);
-
     if (launched == NO) {
         if (items_at_launch) {
             int items = [o_names count];
@@ -1004,6 +1002,8 @@ static VLCMain *_o_sharedMainInstance = nil;
         }
     }
 
+    char *psz_uri = vlc_path2uri([[o_names objectAtIndex:0] UTF8String], NULL);
+
     // try to add file as subtitle
     if ([o_names count] == 1 && psz_uri) {
         input_thread_t * p_input = pl_CurrentInput(VLCIntf);
@@ -1031,8 +1031,6 @@ static VLCMain *_o_sharedMainInstance = nil;
     }
 
     [o_playlist appendArray: o_result atPos: -1 enqueue: !config_GetInt(VLCIntf, "macosx-autoplay")];
-
-    return;
 }
 
 /* When user click in the Dock icon our double click in the finder */



More information about the vlc-commits mailing list