Fix https://github.com/matthieugrieger/mumbledj/issues/55: Crash after skipping last song of playlist
This commit is contained in:
parent
b6c5310240
commit
ccb0b4a3de
|
@ -1,6 +1,9 @@
|
|||
MumbleDJ Changelog
|
||||
==================
|
||||
|
||||
### March 28, 2015 -- `v2.6.10`
|
||||
* Fixed a crash that would occur when the last song of a playlist was skipped.
|
||||
|
||||
### March 27, 2015 -- `v2.6.9`
|
||||
* Fixed a race condition that would sometimes cause the bot to crash (thanks [dylanetaft](https://github.com/dylanetaft)!).
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ func (q *SongQueue) CurrentSong() *Song {
|
|||
func (q *SongQueue) NextSong() {
|
||||
if q.CurrentSong().playlist != nil {
|
||||
if s, err := q.PeekNext(); err == nil {
|
||||
if q.CurrentSong().playlist.id != s.playlist.id {
|
||||
if s.playlist != nil && (q.CurrentSong().playlist.id != s.playlist.id) {
|
||||
q.CurrentSong().playlist.DeleteSkippers()
|
||||
}
|
||||
} else {
|
||||
|
|
Reference in a new issue