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 }