diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2016-06-23 13:04:10 +0200 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2016-06-23 13:04:10 +0200 |
commit | 13fa133f3d47d1cb92f0df5f6f4d79d083dee7f3 (patch) | |
tree | fd035d188f383c9f27b6cbb11d0a79e2463531a8 /core/src | |
parent | b7dfea13b049bf8faeced594e7e6ef223a7e41eb (diff) | |
download | AntennaPod-13fa133f3d47d1cb92f0df5f6f4d79d083dee7f3.zip |
Prevent crash when image url is empty string
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/glide/ApOkHttpUrlLoader.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/glide/ApOkHttpUrlLoader.java b/core/src/main/java/de/danoeh/antennapod/core/glide/ApOkHttpUrlLoader.java index d67db198d..762e92286 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/glide/ApOkHttpUrlLoader.java +++ b/core/src/main/java/de/danoeh/antennapod/core/glide/ApOkHttpUrlLoader.java @@ -86,7 +86,9 @@ public class ApOkHttpUrlLoader implements ModelLoader<String, InputStream> { public DataFetcher<InputStream> getResourceFetcher(String model, int width, int height) { Log.d(TAG, "getResourceFetcher() called with: " + "model = [" + model + "], width = [" + width + "], height = [" + height + "]"); - if(model.startsWith("/")) { + if(TextUtils.isEmpty(model)) { + return null; + } else if(model.startsWith("/")) { return new AudioCoverFetcher(model); } else { GlideUrl url = new GlideUrl(model); |