desktop/window: guard null monitor in xwaylandSizeToReal (#13876)

This commit is contained in:
xxyangyoulin 2026-03-29 03:07:49 +08:00 committed by GitHub
parent 5083057016
commit 6226f3b197
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
}