layout/groupTarget: fix crash on null space assignment (#13614)

nullchecks my life
This commit is contained in:
Vaxry 2026-03-07 18:47:17 +00:00 committed by Vaxry
parent cc19f2ee8a
commit 9cdd5e8337
Signed by: vaxry
GPG key ID: 665806380871D640
2 changed files with 4 additions and 2 deletions

View file

@ -95,7 +95,8 @@ void CLayoutManager::endDragTarget() {
}
void CLayoutManager::fullscreenRequestForTarget(SP<ITarget> target, eFullscreenMode currentEffectiveMode, eFullscreenMode effectiveMode) {
target->space()->setFullscreen(target, effectiveMode);
if (target->space())
target->space()->setFullscreen(target, effectiveMode);
}
void CLayoutManager::switchTargets(SP<ITarget> a, SP<ITarget> b, bool preserveFocus) {

View file

@ -38,7 +38,8 @@ void CWindowGroupTarget::updatePos() {
void CWindowGroupTarget::assignToSpace(const SP<CSpace>& space, std::optional<Vector2D> focalPoint) {
ITarget::assignToSpace(space, focalPoint);
m_group->updateWorkspace(space->workspace());
if (space)
m_group->updateWorkspace(space->workspace());
}
bool CWindowGroupTarget::floating() {