From 50876f1b15b08c9a170067533b12143fa6512d0e Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 7 Apr 2023 19:11:30 +0100 Subject: [PATCH] screencopy: fix read on incorrect monitor render --- src/protocols/Screencopy.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/protocols/Screencopy.cpp b/src/protocols/Screencopy.cpp index 028192503..181cd9b33 100644 --- a/src/protocols/Screencopy.cpp +++ b/src/protocols/Screencopy.cpp @@ -297,6 +297,9 @@ void CScreencopyProtocolManager::onRenderEnd(CMonitor* pMonitor) { continue; } + if (f->pMonitor != pMonitor) + continue; + shareFrame(f); framesToRemove.push_back(f); @@ -408,4 +411,4 @@ bool CScreencopyProtocolManager::copyFrameDmabuf(SScreencopyFrame* frame) { // todo Debug::log(ERR, "DMABUF copying not impl'd!"); return false; -} \ No newline at end of file +}