Skip to content

Commit

Permalink
[apptracer] Fix nil on Trace()
Browse files Browse the repository at this point in the history
  • Loading branch information
evalphobia committed Nov 9, 2018
1 parent 632c452 commit 107ef05
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apptracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ func (a *AppTracer) AddClient(c PlatformClient) {
// when pass the same context.
func (a *AppTracer) Trace(ctx context.Context) *TraceWrapper {
switch {
case !a.Config.Enable,
ctx == nil:
case ctx == nil,
a == nil,
!a.Config.Enable:
return &TraceWrapper{}
}

Expand Down

0 comments on commit 107ef05

Please sign in to comment.