Check for Zero-Length Buffer - INVALID Snapshot

plugin-touch-ups
iKonTech 2024-08-17 13:03:48 -05:00
parent 52b1f13106
commit de1bd5cd08
1 changed files with 2 additions and 1 deletions

View File

@ -39,7 +39,8 @@ module.exports = (s,config,lang) => {
async function saveImageFromEvent(options,frameBuffer){
const monitorId = options.mid || options.id
const groupKey = options.ke
if(!frameBuffer || imageSaveEventLock[groupKey + monitorId])return;
//if(!frameBuffer || imageSaveEventLock[groupKey + monitorId])return;
if(!frameBuffer || frameBuffer.length === 0 || imageSaveEventLock[groupKey + monitorId]) return;
const eventTime = options.time
const objectsFound = options.matrices
const monitorConfig = Object.assign({id: monitorId},s.group[groupKey].rawMonitorConfigurations[monitorId])