Fix crash when reporting an event longer than section length when event was just closed so event is null.

This commit is contained in:
Isaac Connor 2019-04-16 11:30:18 -04:00
parent 98a9c68b8b
commit 2ff1e7ed6d
1 changed files with 15 additions and 13 deletions

View File

@ -1715,7 +1715,8 @@ bool Monitor::Analyse() {
else else
event->AddFrame(snap_image, *timestamp, score); event->AddFrame(snap_image, *timestamp, score);
} }
if ( event && noteSetMap.size() > 0 ) if ( event ) {
if ( noteSetMap.size() > 0 )
event->updateNotes(noteSetMap); event->updateNotes(noteSetMap);
if ( section_length if ( section_length
@ -1729,6 +1730,7 @@ bool Monitor::Analyse() {
section_length section_length
); );
} }
} // end if event
} else if ( state == ALERT ) { } else if ( state == ALERT ) {
event->AddFrame(snap_image, *timestamp); event->AddFrame(snap_image, *timestamp);