Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
eab70f5d
Commit
eab70f5d
authored
Aug 15, 2011
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: fixed crash when opening multiple files using the simple open dialog
parent
189e1eca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
modules/gui/macosx/open.m
modules/gui/macosx/open.m
+13
-8
No files found.
modules/gui/macosx/open.m
View file @
eab70f5d
...
@@ -1082,9 +1082,8 @@ static VLCOpen *_o_sharedMainInstance = nil;
...
@@ -1082,9 +1082,8 @@ static VLCOpen *_o_sharedMainInstance = nil;
-
(
void
)
openFile
-
(
void
)
openFile
{
{
NSOpenPanel
*
o_open_panel
=
[
NSOpenPanel
openPanel
];
NSOpenPanel
*
o_open_panel
=
[
NSOpenPanel
openPanel
];
int
i
;
b_autoplay
=
config_GetInt
(
VLCIntf
,
"macosx-autoplay"
);
b_autoplay
=
config_GetInt
(
VLCIntf
,
"macosx-autoplay"
);
[
o_open_panel
setAllowsMultipleSelection
:
YES
];
[
o_open_panel
setAllowsMultipleSelection
:
YES
];
[
o_open_panel
setCanChooseDirectories
:
YES
];
[
o_open_panel
setCanChooseDirectories
:
YES
];
[
o_open_panel
setTitle
:
_NS
(
"Open File"
)];
[
o_open_panel
setTitle
:
_NS
(
"Open File"
)];
...
@@ -1092,14 +1091,20 @@ static VLCOpen *_o_sharedMainInstance = nil;
...
@@ -1092,14 +1091,20 @@ static VLCOpen *_o_sharedMainInstance = nil;
if
(
[
o_open_panel
runModal
]
==
NSOKButton
)
if
(
[
o_open_panel
runModal
]
==
NSOKButton
)
{
{
NSArray
*
o_array
=
[
NSArray
array
];
NSArray
*
o_urls
=
[
o_open_panel
URLs
];
NSArray
*
o_values
=
[[
o_open_panel
URLs
]
NSUInteger
count
=
[
o_urls
count
];
sortedArrayUsingSelector:
@selector
(
caseInsensitiveCompare
:)];
NSMutableArray
*
o_values
=
[
NSMutableArray
arrayWithCapacity
:
count
];
NSMutableArray
*
o_array
=
[
NSMutableArray
arrayWithCapacity
:
count
];
for
(
NSUInteger
i
=
0
;
i
<
count
;
i
++
)
{
[
o_values
addObject
:
[[
o_urls
objectAtIndex
:
i
]
path
]];
}
[
o_values
sortUsingSelector
:
@selector
(
caseInsensitiveCompare
:)];
for
(
i
=
0
;
i
<
(
int
)[
o_values
count
];
i
++
)
for
(
NSUInteger
i
=
0
;
i
<
count
;
i
++
)
{
{
NSDictionary
*
o_dic
;
NSDictionary
*
o_dic
;
char
*
psz_uri
=
make_URI
([[
[
o_values
objectAtIndex
:
i
]
path
]
UTF8String
],
"file"
);
char
*
psz_uri
=
make_URI
([[
o_values
objectAtIndex
:
i
]
UTF8String
],
"file"
);
if
(
!
psz_uri
)
if
(
!
psz_uri
)
continue
;
continue
;
...
@@ -1107,7 +1112,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
...
@@ -1107,7 +1112,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
free
(
psz_uri
);
free
(
psz_uri
);
o_array
=
[
o_array
arrayByAdding
Object
:
o_dic
];
[
o_array
add
Object
:
o_dic
];
}
}
if
(
b_autoplay
)
if
(
b_autoplay
)
[
o_playlist
appendArray
:
o_array
atPos
:
-
1
enqueue
:
NO
];
[
o_playlist
appendArray
:
o_array
atPos
:
-
1
enqueue
:
NO
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment