diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index f849c21b7..66b87cf36 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -3119,8 +3119,10 @@ bool Monitor::closeEvent() if ( function == RECORD || function == MOCORD ) { gettimeofday( &(event->EndTime()), NULL ); - if ( config.load_plugins ) - ThePluginManager.getImageAnalyser().onCloseEvent( zones, event ); + } + if ( config.load_plugins && ( purpose == ANALYSIS ) ) + { + ThePluginManager.getImageAnalyser().onCloseEvent( zones, event ); } delete event; event = 0;