mirror of
https://github.com/mumble-voip/grumble.git
synced 2025-12-19 21:59:59 -08:00
Sometimes the channel can be nil - we shouldn't crash in this situation
This commit is contained in:
parent
c109af8d88
commit
ebe189c524
1 changed files with 7 additions and 5 deletions
|
|
@ -401,11 +401,13 @@ func (server *Server) handlerLoop() {
|
||||||
case vb := <-server.voicebroadcast:
|
case vb := <-server.voicebroadcast:
|
||||||
if vb.target == 0 { // Current channel
|
if vb.target == 0 { // Current channel
|
||||||
channel := vb.client.Channel
|
channel := vb.client.Channel
|
||||||
for _, client := range channel.clients {
|
if channel != nil {
|
||||||
if client != vb.client {
|
for _, client := range channel.clients {
|
||||||
err := client.SendUDP(vb.buf)
|
if client != vb.client {
|
||||||
if err != nil {
|
err := client.SendUDP(vb.buf)
|
||||||
client.Panicf("Unable to send UDP: %v", err)
|
if err != nil {
|
||||||
|
client.Panicf("Unable to send UDP: %v", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue