From 7ca41b6ea1aa48264144fc53e7766a6796acb2c7 Mon Sep 17 00:00:00 2001 From: David Colburn Date: Thu, 18 Jan 2024 14:01:04 -0800 Subject: [PATCH] fix panic (#383) --- pkg/jitter/buffer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/jitter/buffer.go b/pkg/jitter/buffer.go index bf4aafaf..299eb86c 100644 --- a/pkg/jitter/buffer.go +++ b/pkg/jitter/buffer.go @@ -426,7 +426,7 @@ func (b *Buffer) drop() { c = b.head // break if head is part of a new sample - if b.head.packet.Timestamp != ts { + if b.head == nil || b.head.packet.Timestamp != ts { break } }