Fix crash on invalid team

This commit is contained in:
Wim 2016-07-22 23:47:25 +02:00
parent 9db48f4794
commit c769e23a9a
1 changed files with 2 additions and 2 deletions

View File

@ -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"