diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 698e164e3..20e550ebc 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -560,7 +560,7 @@ bool Monitor::connect() { Debug(3,"Aligning shared memory images to the next 64 byte boundary"); shared_images = (uint8_t*)((unsigned long)shared_images + (64 - ((unsigned long)shared_images % 64))); } - if ( purpose == CAPTURE ) { + if ( purpose != ANALYSIS ) { Debug(3, "Allocating %d image buffers", image_buffer_count ); image_buffer = new Snapshot[image_buffer_count]; for ( int i = 0; i < image_buffer_count; i++ ) { diff --git a/src/zm_monitorstream.cpp b/src/zm_monitorstream.cpp index aaa5e8289..6b1614d76 100644 --- a/src/zm_monitorstream.cpp +++ b/src/zm_monitorstream.cpp @@ -484,7 +484,10 @@ void MonitorStream::runStream() { openComms(); - checkInitialised(); + if ( ! checkInitialised() ) { + Error("Not initialized"); + return; + } updateFrameRate( monitor->GetFPS() );