Skip to content

Commit adeb586

Browse files
committed
Fix NPE in PayloadDispatcherImpl
1 parent 7c1b47b commit adeb586

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dd-trace-core/src/main/java/datadog/trace/common/writer/PayloadDispatcherImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public void addTrace(List<? extends CoreSpan<?>> trace) {
6868
// there are alternative approaches to avoid blocking here, such as
6969
// introducing an unbound queue and another thread to do the IO
7070
// however, we can't block the application threads from here.
71-
if (null == mapper || !packer.format(trace, mapper)) {
71+
if (null == mapper || null == packer || !packer.format(trace, mapper)) {
7272
healthMetrics.onFailedPublish(
7373
trace.isEmpty() ? 0 : trace.get(0).samplingPriority(), trace.size());
7474
}

0 commit comments

Comments
 (0)