From c769e23a9a31ab5114d6027412fa70053295fc14 Mon Sep 17 00:00:00 2001 From: Wim Date: Fri, 22 Jul 2016 23:47:25 +0200 Subject: [PATCH] Fix crash on invalid team --- matterclient/matterclient.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matterclient/matterclient.go b/matterclient/matterclient.go index db6c54a3..a1efa957 100644 --- a/matterclient/matterclient.go +++ b/matterclient/matterclient.go @@ -144,11 +144,11 @@ func (m *MMClient) Login() error { return err } - // set our team id as default route - m.Client.SetTeamId(m.Team.Id) if m.Team == nil { return errors.New("team not found") } + // set our team id as default route + m.Client.SetTeamId(m.Team.Id) // setup websocket connection wsurl := wsScheme + m.Credentials.Server + "/api/v3/users/websocket"