Return NULL instead of result when unable to load bitmap.
There are still cases where 'bitmap' could be null. We shouldn't return a result when that's the case. Returnning null appears to be supported by Picasso. (see Picasso.NetworkRequestHandler) Fixes AntennaPod/AntennaPod#947
This commit is contained in:
parent
5e8c75a1da
commit
f2dd49d533
|
@ -170,6 +170,12 @@ public class PicassoProvider {
|
|||
bitmap = decodeStreamFromFile(data, fallback);
|
||||
}
|
||||
}
|
||||
|
||||
if (bitmap == null) {
|
||||
Log.e(TAG, "Could not load media");
|
||||
return null;
|
||||
}
|
||||
|
||||
return new Result(bitmap, Picasso.LoadedFrom.DISK);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue