Skip to content

Commit

Permalink
Fix panic on disabled event with CallerSkipFrame
Browse files Browse the repository at this point in the history
Fixes #319
  • Loading branch information
rs committed May 20, 2021
1 parent 47a03bc commit 6ed1127
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions event.go
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,9 @@ func (e *Event) Interface(key string, i interface{}) *Event {
// CallerSkipFrame instructs any future Caller calls to skip the specified number of frames.
// This includes those added via hooks from the context.
func (e *Event) CallerSkipFrame(skip int) *Event {
if e == nil {
return e
}
e.skipFrame += skip
return e
}
Expand Down

1 comment on commit 6ed1127

@lovromazgon
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rs when can we expect a release with this commit? Our code panics without it and our dependency currently points to this commit instead of a tag.

Please sign in to comment.