Merge pull request #2038 from mfietz/issue/2037-queue-glide-empty
Prevent crash when image url is empty string
This commit is contained in:
commit
483377ab85
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue