Don't crash for null songs

This commit is contained in:
Christopher Eby committed 2010-07-17 19:39:23 -05:00
1 parent 4634dd8ca5
commit 4495daf234
1 file changed
+3
+3
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();