Don't crash for null songs

This commit is contained in:
Christopher Eby 2010-07-17 19:39:23 -05:00
parent 4634dd8ca5
commit 4495daf234

View File

@ -314,6 +314,9 @@ public final class CoverView extends View implements Handler.Callback {
*/
private void generateBitmap(Song song)
{
if (song == null)
return;
Bitmap bitmap = mBitmapCache.get(song.id);
if (bitmap == null) {
bitmap = mBitmapCache.discardOldest();