Fix https://github.com/matthieugrieger/mumbledj/issues/154: Crash on !forceskip
This commit is contained in:
parent
0320ca75fa
commit
1731047317
|
@ -1,6 +1,9 @@
|
||||||
MumbleDJ Changelog
|
MumbleDJ Changelog
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
### June 25, 2016 -- `v3.0.4`
|
||||||
|
* Fixed a crash on `!forceskip`.
|
||||||
|
|
||||||
### June 22, 2016 -- `v3.0.3`
|
### June 22, 2016 -- `v3.0.3`
|
||||||
* Fixed SoundCloud API startup check (thanks [@alucardRD](https://github.com/alucardRD)).
|
* Fixed SoundCloud API startup check (thanks [@alucardRD](https://github.com/alucardRD)).
|
||||||
|
|
||||||
|
|
|
@ -189,9 +189,8 @@ func (q *Queue) RandomNextTrack(queueWasEmpty bool) {
|
||||||
// Skip performs the necessary actions that take place when a track is skipped
|
// Skip performs the necessary actions that take place when a track is skipped
|
||||||
// via a command.
|
// via a command.
|
||||||
func (q *Queue) Skip() {
|
func (q *Queue) Skip() {
|
||||||
// Stop audio stream if one exists.
|
// Set AudioStream to nil if it isn't already.
|
||||||
if DJ.AudioStream != nil {
|
if DJ.AudioStream != nil {
|
||||||
q.StopCurrent()
|
|
||||||
DJ.AudioStream = nil
|
DJ.AudioStream = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -346,7 +345,6 @@ func (q *Queue) StopCurrent() error {
|
||||||
return errors.New("The audio stream is nil")
|
return errors.New("The audio stream is nil")
|
||||||
}
|
}
|
||||||
DJ.AudioStream.Stop()
|
DJ.AudioStream.Stop()
|
||||||
DJ.AudioStream = nil
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue