algo/scrolling: fix rare crash

This commit is contained in:
Vaxry 2026-03-03 20:59:18 +00:00
parent edf7098345
commit dc4b082ee8
No known key found for this signature in database
GPG key ID: 665806380871D640

View file

@ -1496,7 +1496,7 @@ CBox CScrollingAlgorithm::usableArea() {
CBox box = m_parent->space()->workArea();
// doesn't matter, this happens when this algo is about to be destroyed
if (!m_parent->space()->workspace())
if (!m_parent->space()->workspace() || !m_parent->space()->workspace()->m_monitor)
return box;
box.translate(-m_parent->space()->workspace()->m_monitor->m_position);