Merge pull request #313 from ogarcia/fix-unknown-image

Fix fatal error loading unknown album cover
This commit is contained in:
Óscar García Amor 2020-09-25 19:42:21 +02:00 committed by GitHub
commit bd3e4df805
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -120,11 +120,11 @@ public class LegacyImageLoader implements Runnable, ImageLoader {
}
private void createLargeUnknownImage(Context context) {
BitmapDrawable drawable = (BitmapDrawable) context.getResources().getDrawable(R.drawable.unknown_album);
Drawable drawable = context.getResources().getDrawable(R.drawable.unknown_album);
Log.i(TAG, "createLargeUnknownImage");
if (drawable != null) {
largeUnknownImage = Util.scaleBitmap(drawable.getBitmap(), imageSizeLarge);
largeUnknownImage = Util.createBitmapFromDrawable(drawable);
}
}