Commit b34dd4b0 authored by David Fuhrmann's avatar David Fuhrmann

macosx: fix memleak, cosmetics

parent 2fa14379
...@@ -991,8 +991,6 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -991,8 +991,6 @@ static VLCMain *_o_sharedMainInstance = nil;
- (void)application:(NSApplication *)o_app openFiles:(NSArray *)o_names - (void)application:(NSApplication *)o_app openFiles:(NSArray *)o_names
{ {
char *psz_uri = vlc_path2uri([[o_names objectAtIndex:0] UTF8String], NULL);
if (launched == NO) { if (launched == NO) {
if (items_at_launch) { if (items_at_launch) {
int items = [o_names count]; int items = [o_names count];
...@@ -1004,6 +1002,8 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -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 // try to add file as subtitle
if ([o_names count] == 1 && psz_uri) { if ([o_names count] == 1 && psz_uri) {
input_thread_t * p_input = pl_CurrentInput(VLCIntf); input_thread_t * p_input = pl_CurrentInput(VLCIntf);
...@@ -1031,8 +1031,6 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -1031,8 +1031,6 @@ static VLCMain *_o_sharedMainInstance = nil;
} }
[o_playlist appendArray: o_result atPos: -1 enqueue: !config_GetInt(VLCIntf, "macosx-autoplay")]; [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 */ /* When user click in the Dock icon our double click in the finder */
......
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