Add a null pointer check for mMediaPlayer
It can happen...
This commit is contained in:
parent
87585922f2
commit
19cec7b0b6
@ -302,8 +302,10 @@ public class PlaybackService extends Service implements Runnable, MediaPlayer.On
|
||||
mScrobble = mSettings.getBoolean("scrobble", false);
|
||||
} else if ("volume".equals(key)) {
|
||||
float volume = mSettings.getFloat("volume", 1.0f);
|
||||
synchronized (mMediaPlayer) {
|
||||
mMediaPlayer.setVolume(volume, volume);
|
||||
if (mMediaPlayer != null) {
|
||||
synchronized (mMediaPlayer) {
|
||||
mMediaPlayer.setVolume(volume, volume);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user