Add test for event before calling event->Duration.

pull/3462/head
Isaac Connor 2022-03-26 12:47:26 -04:00
parent 1c9c3d34f5
commit 9f404f7b97
1 changed files with 1 additions and 1 deletions

View File

@ -2028,7 +2028,7 @@ bool Monitor::Analyse() {
Info("%s: %03d - Gone into alert state", name.c_str(), analysis_image_count);
shared_data->state = state = ALERT;
} else if (state == ALERT) {
if (
if ( event &&
((analysis_image_count - last_alarm_count) > post_event_count)
&&
(event->Duration() >= min_section_length)) {