Null checks are good
This commit is contained in:
1 parent
2fb8ec71f0
commit
c7f33c2f61
1 file changed
+3
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user