Resolve null pointer when empty playlist

This commit is contained in:
BrokenFire 2018-02-26 16:44:47 +01:00
parent f2d578cf7f
commit b3079b17b9

View File

@ -126,7 +126,8 @@ public class TrackScheduler extends AudioEventAdapter {
// giving null to startTrack, which is a valid argument and will simply stop the player.
UserAudioTrack track = queue.poll();
this.currentPlayingTrack = track;
player.startTrack(track.getAudioTrack(), false);
if(track != null)
player.startTrack(track.getAudioTrack(), false);
}
@Override