[Android] Prevent NPE in subs downloader
Geoffrey Métais
git at videolan.org
Mon Oct 2 10:25:29 CEST 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Oct 2 10:14:53 2017 +0200| [db5fba13e9f90aad3af02909637dc9aab3d48277] | committer: Geoffrey Métais
Prevent NPE in subs downloader
> https://code.videolan.org/videolan/vlc-android/commit/db5fba13e9f90aad3af02909637dc9aab3d48277
---
vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java b/vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java
index 6a7721655..5606b74fe 100644
--- a/vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java
+++ b/vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java
@@ -355,6 +355,8 @@ public class SubtitlesDownloader {
for (MediaWrapper media : mediaList) {
if (stop)
break;
+ if (media == null)
+ continue;
String hash = null, tag = null;
long fileLength = 0;
final Uri mediaUri = media.getUri();
More information about the Android
mailing list