Merge pull request #950 from TomHennen/fix947

Return NULL instead of result when unable to load bitmap.
This commit is contained in:
Tom Hennen 2015-06-25 18:55:28 -04:00
commit e3fe7e3fed

View File

@ -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);
}