Small bug fix.

This commit is contained in:
Karim Abou Zeid 2015-05-23 12:44:14 +02:00
commit 2a7dad6ad0

View file

@ -796,7 +796,7 @@ public class MusicService extends Service implements MediaPlayer.OnPreparedListe
//to let other apps know whats playing. i.E. last.fm (scrobbling) or musixmatch //to let other apps know whats playing. i.E. last.fm (scrobbling) or musixmatch
final Intent intent = new Intent(what); final Intent intent = new Intent(what);
final int position = getPosition(); final int position = getPosition();
if(position >= 0) { if (position >= 0 && !playingQueue.isEmpty()) {
final Song currentSong = playingQueue.get(position); final Song currentSong = playingQueue.get(position);
intent.putExtra("id", currentSong.id); intent.putExtra("id", currentSong.id);
intent.putExtra("artist", currentSong.artistName); intent.putExtra("artist", currentSong.artistName);