only start playback if mCurrentSong is set

This commit is contained in:
Adrian Ulrich 2014-10-07 20:50:17 +02:00
parent 82154e740c
commit 7cefab87a6

View File

@ -883,7 +883,7 @@ public final class PlaybackService extends Service
{
int toggled = oldState ^ state;
if ((toggled & FLAG_PLAYING) != 0) {
if ( ((toggled & FLAG_PLAYING) != 0) && mCurrentSong != null) { // user requested to start playback AND we have a song selected
if ((state & FLAG_PLAYING) != 0) {
if (mMediaPlayerInitialized)
mMediaPlayer.start();