Null checks are good
This commit is contained in:
parent
2fb8ec71f0
commit
c7f33c2f61
@ -114,6 +114,9 @@ public final class CoverBitmap {
|
||||
return null;
|
||||
|
||||
Bitmap cover = song.getCover();
|
||||
if (cover == null)
|
||||
return null;
|
||||
|
||||
int coverWidth = cover.getWidth();
|
||||
int coverHeight = cover.getHeight();
|
||||
float scale = coverWidth > coverHeight ? (float)size / coverWidth : (float)size / coverHeight;
|
||||
|
Loading…
x
Reference in New Issue
Block a user