Skip to content

Commit

Permalink
golang/oauth2: fixxed nil pointer reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Dainismo committed Nov 13, 2023
1 parent b1b9cc6 commit 88cd8be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oauth2.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ func (s *reuseTokenSource) Token() (*Token, error) {
return nil, err
}
t.expiryDelta = s.expiryDelta
if s.t.OnTokenRefresh != nil {
if s.t != nil && s.t.OnTokenRefresh != nil {
t.OnTokenRefresh = s.t.OnTokenRefresh
t.OnTokenRefresh(*t)
}
Expand Down

0 comments on commit 88cd8be

Please sign in to comment.