From 737c31e274880053285b54fa4f61df08d66cb821 Mon Sep 17 00:00:00 2001 From: Haw Loeung Date: Sat, 27 Jun 2026 21:20:31 +1000 Subject: [PATCH] Fix segmentation fault on login when no primary team --- vendor/github.com/matterbridge/matterclient/channels.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vendor/github.com/matterbridge/matterclient/channels.go b/vendor/github.com/matterbridge/matterclient/channels.go index 593decc9..2544bf6f 100644 --- a/vendor/github.com/matterbridge/matterclient/channels.go +++ b/vendor/github.com/matterbridge/matterclient/channels.go @@ -1,6 +1,7 @@ package matterclient import ( + "errors" "strings" "github.com/mattermost/mattermost-server/v6/model" @@ -260,6 +261,11 @@ func (m *Client) UpdateChannelsTeam(teamID string) error { } func (m *Client) UpdateChannels() error { + if m.Team == nil { + m.logger.Errorf("cannot update channels: primary team is nil") + return errors.New("cannot update channels: primary team is nil") + } + if err := m.UpdateChannelsTeam(m.Team.ID); err != nil { return err }