From 44938ec5b61fb6783e4e7e76a7efcecacffcf2f8 Mon Sep 17 00:00:00 2001 From: Neil Twigg Date: Thu, 25 Jul 2024 16:10:42 +0100 Subject: [PATCH] Fix panic in `remoteServerUpdate` Signed-off-by: Neil Twigg --- server/events.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/events.go b/server/events.go index b6c2a667184..611021b4d50 100644 --- a/server/events.go +++ b/server/events.go @@ -1632,7 +1632,7 @@ func (s *Server) remoteServerUpdate(sub *subscription, c *client, _ *Account, su si.BinaryStreamSnapshot(), accountNRG, }) - if accountNRG != oldInfo.(nodeInfo).accountNRG { + if oldInfo == nil || accountNRG != oldInfo.(nodeInfo).accountNRG { // One of the servers we received statsz from changed its mind about // whether or not it supports in-account NRG, so update the groups // with this information.