add braces and only call closeEvent if there is an event

This commit is contained in:
Isaac Connor 2016-09-13 09:36:45 -04:00
parent 44591432dd
commit 39e06b929f
1 changed files with 3 additions and 2 deletions

View File

@ -640,9 +640,10 @@ Monitor::~Monitor()
privacy_bitmask = NULL; privacy_bitmask = NULL;
} }
if ( mem_ptr ) { if ( mem_ptr ) {
if ( event ) if ( event ) {
Info( "%s: %03d - Closing event %d, shutting down", name, image_count, event->Id() ); Info( "%s: %03d - Closing event %d, shutting down", name, image_count, event->Id() );
closeEvent(); closeEvent();
}
if ( (deinterlacing & 0xff) == 4) if ( (deinterlacing & 0xff) == 4)
{ {