From a7b912b1b578e46d22c69c6ce83c0265eb58b857 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Sat, 17 Jan 2015 21:54:47 +0100 Subject: [PATCH] Fix call to onCloseEvent --- src/zm_monitor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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;