screencopy: fix minor crash (#13566)

This commit is contained in:
Ikalco 2026-03-04 14:01:37 -06:00 committed by Vaxry
parent 628cc608d2
commit 4e43a3358d
Signed by: vaxry
GPG key ID: 665806380871D640

View file

@ -295,8 +295,11 @@ void CScreenshareFrame::renderWindow() {
return;
auto pointerSurface = Desktop::View::CWLSurface::fromResource(pointerSurfaceResource);
if (!pointerSurface)
return;
if (!pointerSurface || pointerSurface->getSurfaceBoxGlobal()->intersection(m_session->m_window->getFullWindowBoundingBox()).empty())
auto box = pointerSurface->getSurfaceBoxGlobal();
if (!box.has_value() || box->intersection(m_session->m_window->getFullWindowBoundingBox()).empty())
return;
if (Desktop::focusState()->window() != m_session->m_window)