diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-03-07 18:47:17 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-07 18:47:17 +0000 |
| commit | 3b09986f32ab18c604350307e029ee04d8c114b1 (patch) | |
| tree | 732292134dea6b715f358f0af7f135d0a5b4be09 /src/layout | |
| parent | 02f30ea15b349d1ed98b608ed06ec88c834592dd (diff) | |
layout/groupTarget: fix crash on null space assignment (#13614)
nullchecks my life
Diffstat (limited to 'src/layout')
| -rw-r--r-- | src/layout/LayoutManager.cpp | 3 | ||||
| -rw-r--r-- | src/layout/target/WindowGroupTarget.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/layout/LayoutManager.cpp b/src/layout/LayoutManager.cpp index 4a93809c..3f28085f 100644 --- a/src/layout/LayoutManager.cpp +++ b/src/layout/LayoutManager.cpp @@ -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) { diff --git a/src/layout/target/WindowGroupTarget.cpp b/src/layout/target/WindowGroupTarget.cpp index ae883751..3b1dc91e 100644 --- a/src/layout/target/WindowGroupTarget.cpp +++ b/src/layout/target/WindowGroupTarget.cpp @@ -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() { |
