Resolve null pointer when empty playlist
This commit is contained in:
parent
f2d578cf7f
commit
b3079b17b9
@ -126,6 +126,7 @@ public class TrackScheduler extends AudioEventAdapter {
|
|||||||
// giving null to startTrack, which is a valid argument and will simply stop the player.
|
// giving null to startTrack, which is a valid argument and will simply stop the player.
|
||||||
UserAudioTrack track = queue.poll();
|
UserAudioTrack track = queue.poll();
|
||||||
this.currentPlayingTrack = track;
|
this.currentPlayingTrack = track;
|
||||||
|
if(track != null)
|
||||||
player.startTrack(track.getAudioTrack(), false);
|
player.startTrack(track.getAudioTrack(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user