summaryrefslogtreecommitdiff
path: root/src/desktop/view/Window.cpp
diff options
context:
space:
mode:
authorxxyangyoulin <xxyangyoulin@gmail.com>2026-03-29 03:07:49 +0800
committerGitHub <noreply@github.com>2026-03-28 19:07:49 +0000
commit6226f3b197bf9ef41ef580123c474fdd46ac6e87 (patch)
tree4facede03f362e0eb7d406d9f1c2dda6ae249868 /src/desktop/view/Window.cpp
parent508305701632b8218c3b1695040e1f98c435fd88 (diff)
desktop/window: guard null monitor in xwaylandSizeToReal (#13876)
Diffstat (limited to 'src/desktop/view/Window.cpp')
-rw-r--r--src/desktop/view/Window.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/desktop/view/Window.cpp b/src/desktop/view/Window.cpp
index 9656bf28..287440e8 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;
}