Commit d0327c92 authored by Edward Wang's avatar Edward Wang
Browse files

AudioService: blind fix for a NullPointerException

parent 29dd37f0
......@@ -471,9 +471,11 @@ public class AudioService extends Service {
int titleColumn = cursor.getColumnIndex(android.provider.MediaStore.Audio.Albums.ALBUM_ART);
String albumArt = cursor.getString(titleColumn);
cursor.close();
Bitmap b = BitmapFactory.decodeFile(albumArt);
if (b != null)
return b;
if(albumArt != null) { // could be null (no album art stored)
Bitmap b = BitmapFactory.decodeFile(albumArt);
if (b != null)
return b;
}
}
//cover not in MediaStore, trying vlc
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment