From 342f86d4c4174fb6c99a2ef1c0046eecf4decdbe Mon Sep 17 00:00:00 2001 From: "." <.@.> Date: Sat, 7 May 2016 17:50:53 +1200 Subject: [PATCH] fix panic on PM before joining upstream --HG-- branch : nmdc-ircfrontend --- server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.go b/server.go index fd01c45..ee1a6ab 100644 --- a/server.go +++ b/server.go @@ -342,7 +342,7 @@ func (s *Server) handleRegisteredCommand(command string, args []string) { return } - if s.upstream.State != libnmdc.CONNECTIONSTATE_CONNECTED { + if s.upstream == nil || s.upstream.State != libnmdc.CONNECTIONSTATE_CONNECTED { s.reply(errCannotSend, args[0]) return }