From 6226f3b197bf9ef41ef580123c474fdd46ac6e87 Mon Sep 17 00:00:00 2001 From: xxyangyoulin Date: Sun, 29 Mar 2026 03:07:49 +0800 Subject: [PATCH] desktop/window: guard null monitor in xwaylandSizeToReal (#13876) --- src/desktop/view/Window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/desktop/view/Window.cpp b/src/desktop/view/Window.cpp index 9656bf28c..287440e85 100644 --- a/src/desktop/view/Window.cpp +++ b/src/desktop/view/Window.cpp @@ -1364,7 +1364,7 @@ Vector2D CWindow::xwaylandSizeToReal(Vector2D size) { const auto PMONITOR = m_monitor.lock(); const auto SIZE = size.clamp(Vector2D{1, 1}, Math::VECTOR2D_MAX); - const auto SCALE = *PXWLFORCESCALEZERO ? PMONITOR->m_scale : 1.0f; + const auto SCALE = *PXWLFORCESCALEZERO && PMONITOR ? PMONITOR->m_scale : 1.0f; return SIZE / SCALE; }