Skip to content

Commit

Permalink
fix: Check for initialized Client in AddBreadcrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyo committed Jun 25, 2019
1 parent 69c26e4 commit cb92951
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,12 @@ func (hub *Hub) CaptureException(exception error) *EventID {
// The total number of breadcrumbs that can be recorded are limited by the
// configuration on the client.
func (hub *Hub) AddBreadcrumb(breadcrumb *Breadcrumb, hint *BreadcrumbHint) {
options := hub.Client().Options()
client := hub.Client()
if client == nil {
return
}

options := client.Options()
maxBreadcrumbs := defaultMaxBreadcrumbs

if options.MaxBreadcrumbs != 0 {
Expand Down

0 comments on commit cb92951

Please sign in to comment.