Skip to content

Commit

Permalink
Fix missing return in mock span (#582)
Browse files Browse the repository at this point in the history
This fix avoids a nil pointer dereference.
  • Loading branch information
krnowak committed Mar 23, 2020
1 parent a1c2439 commit c16f56e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/trace/mock_span.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var _ apitrace.Span = (*MockSpan)(nil)
// an empty core.SpanContext
func (ms *MockSpan) SpanContext() core.SpanContext {
if ms == nil {
core.EmptySpanContext()
return core.EmptySpanContext()
}
return ms.sc
}
Expand Down

0 comments on commit c16f56e

Please sign in to comment.