fix panic on PM before joining upstream

--HG--
branch : nmdc-ircfrontend
This commit is contained in:
. 2016-05-07 17:50:53 +12:00
parent 41139cdd72
commit 342f86d4c4

View File

@ -342,7 +342,7 @@ func (s *Server) handleRegisteredCommand(command string, args []string) {
return return
} }
if s.upstream.State != libnmdc.CONNECTIONSTATE_CONNECTED { if s.upstream == nil || s.upstream.State != libnmdc.CONNECTIONSTATE_CONNECTED {
s.reply(errCannotSend, args[0]) s.reply(errCannotSend, args[0])
return return
} }