Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Ewout ter Hoeven
VLC-Android
Commits
7c506ae1
Commit
7c506ae1
authored
Feb 18, 2015
by
Geoffrey Métais
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid NPE
CID #1270667
parent
483f1b41
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
vlc-android/src/org/videolan/vlc/gui/video/MediaInfoFragment.java
...oid/src/org/videolan/vlc/gui/video/MediaInfoFragment.java
+6
-3
No files found.
vlc-android/src/org/videolan/vlc/gui/video/MediaInfoFragment.java
View file @
7c506ae1
...
...
@@ -162,6 +162,7 @@ public class MediaInfoFragment extends ListFragment {
videoName
=
videoName
.
substring
(
0
,
videoName
.
lastIndexOf
(
'.'
));
String
[]
subFolders
=
{
"/Subtitles"
,
"/subtitles"
,
"/Subs"
,
"/subs"
};
String
[]
files
=
itemFile
.
getParentFile
().
list
();
int
filesLength
=
files
==
null
?
0
:
files
.
length
;
for
(
int
i
=
0
;
i
<
subFolders
.
length
;
++
i
){
File
subFolder
=
new
File
(
parentPath
+
subFolders
[
i
]);
if
(!
subFolder
.
exists
())
...
...
@@ -171,13 +172,15 @@ public class MediaInfoFragment extends ListFragment {
String
[]
newFiles
=
new
String
[
0
];
if
(
subFiles
!=
null
)
{
subFilesLength
=
subFiles
.
length
;
newFiles
=
new
String
[
files
.
l
ength
+
subFilesLength
];
newFiles
=
new
String
[
files
L
ength
+
subFilesLength
];
System
.
arraycopy
(
subFiles
,
0
,
newFiles
,
0
,
subFilesLength
);
}
System
.
arraycopy
(
files
,
0
,
newFiles
,
subFilesLength
,
files
.
length
);
if
(
files
!=
null
)
System
.
arraycopy
(
files
,
0
,
newFiles
,
subFilesLength
,
filesLength
);
files
=
newFiles
;
filesLength
=
files
==
null
?
0
:
files
.
length
;
}
for
(
int
i
=
0
;
i
<
files
.
l
ength
;
++
i
){
for
(
int
i
=
0
;
i
<
files
L
ength
;
++
i
){
filename
=
Uri
.
decode
(
files
[
i
]);
int
index
=
filename
.
lastIndexOf
(
'.'
);
if
(
index
<=
0
)
...
...
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