add test for when an event is deleted during audit

This commit is contained in:
Isaac Connor 2017-08-15 13:06:59 -04:00
parent ae579c9649
commit 85202a0bfd
1 changed files with 4 additions and 0 deletions

View File

@ -351,6 +351,10 @@ MAIN: while( $loop ) {
if ( ! defined( $fs_events->{$db_event} ) ) {
Debug("Event $db_event is not in fs.");
my $Event = new ZoneMinder::Event( $db_event );
if ( ! $Event->Id() ) {
Debug("Event $db_event is no longer in db. Filter probably deleted it while we were auditing.");
next;
}
if ( ! $Event->StartTime() ) {
Debug("Event $$Event{Id} has no start time. deleting it.");
if ( confirm() ) {