Correct null pointer

This commit is contained in:
Sebastien 2018-03-05 14:55:05 +01:00
parent 75113f051a
commit 270f52321b

View File

@ -153,7 +153,8 @@ public class TrackScheduler extends AudioEventAdapter {
// Start the next track, regardless of if something is already playing or not. In case queue was empty, we are
// giving null to startTrack, which is a valid argument and will simply stop the player.
UserAudioTrack track = queue.poll();
this.currentPlayingTrack = track;
if(track != null)
this.currentPlayingTrack = track;
if(track != null)
player.startTrack(track.getAudioTrack(), false);
needAutoPlay();