From e4831909d6d76000430abf245da269a8e07b8f31 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 26 Jan 2021 12:22:26 -0500 Subject: [PATCH] get_packet can return null if we are terminating --- src/zm_monitor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index b5fd5a5f3..186590909 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -1991,6 +1991,7 @@ bool Monitor::Analyse() { // Write out starting packets, do not modify packetqueue it will garbage collect itself while ( start_it != snap_it ) { ZMPacket *p = packetqueue->get_packet(&start_it); + if ( !p ) break; event->AddPacket(p); p->unlock(); start_it ++;