From eda96d24e093509f665b40b0f02df4e14cf52237 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 31 May 2021 16:02:42 -0400 Subject: [PATCH] fix crash when in alert state with no event --- src/zm_monitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 795cd3e94..fb728ef3d 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -2231,7 +2231,7 @@ bool Monitor::Analyse() { } } else if ( state == ALERT ) { // Alert means this frame has no motion, but we were alarmed and are still recording. - if ( noteSetMap.size() > 0 ) + if ((noteSetMap.size() > 0) and event) event->updateNotes(noteSetMap); } else if ( state == TAPE ) { // bulk frame code moved to event.