Skip to content

Commit

Permalink
Fix crash on invalid team
Browse files Browse the repository at this point in the history
  • Loading branch information
42wim committed Jul 22, 2016
1 parent 9db48f4 commit c769e23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions matterclient/matterclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c769e23

Please sign in to comment.