From 39e06b929f9130c2410450930c0cb01f905d37a9 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 13 Sep 2016 09:36:45 -0400 Subject: [PATCH] add braces and only call closeEvent if there is an event --- src/zm_monitor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 9106e6264..c906d7fed 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -640,9 +640,10 @@ Monitor::~Monitor() privacy_bitmask = NULL; } if ( mem_ptr ) { - if ( event ) + if ( event ) { Info( "%s: %03d - Closing event %d, shutting down", name, image_count, event->Id() ); - closeEvent(); + closeEvent(); + } if ( (deinterlacing & 0xff) == 4) {