From 173104731766bd4fe6d275197cf5d1a96ef2d039 Mon Sep 17 00:00:00 2001 From: Matthieu Grieger Date: Sat, 25 Jun 2016 09:03:13 -0700 Subject: [PATCH] Fix https://github.com/matthieugrieger/mumbledj/issues/154: Crash on !forceskip --- CHANGELOG.md | 3 +++ bot/queue.go | 4 +--- main.go | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c786b67..d0e308f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ MumbleDJ Changelog ================== +### June 25, 2016 -- `v3.0.4` +* Fixed a crash on `!forceskip`. + ### June 22, 2016 -- `v3.0.3` * Fixed SoundCloud API startup check (thanks [@alucardRD](https://github.com/alucardRD)). diff --git a/bot/queue.go b/bot/queue.go index 3105a59..6db94ed 100644 --- a/bot/queue.go +++ b/bot/queue.go @@ -189,9 +189,8 @@ func (q *Queue) RandomNextTrack(queueWasEmpty bool) { // Skip performs the necessary actions that take place when a track is skipped // via a command. func (q *Queue) Skip() { - // Stop audio stream if one exists. + // Set AudioStream to nil if it isn't already. if DJ.AudioStream != nil { - q.StopCurrent() DJ.AudioStream = nil } @@ -346,7 +345,6 @@ func (q *Queue) StopCurrent() error { return errors.New("The audio stream is nil") } DJ.AudioStream.Stop() - DJ.AudioStream = nil return nil } diff --git a/main.go b/main.go index a33041d..9ad78d8 100644 --- a/main.go +++ b/main.go @@ -32,7 +32,7 @@ func init() { services.DJ = DJ bot.DJ = DJ - DJ.Version = "3.0.3" + DJ.Version = "v3.0.4" logrus.SetLevel(logrus.WarnLevel) }