config/actions: fix null derefs in pin dispatcher (#14914)
* hyprtester: add issue14134 regression test
D#14134 reports a pin dispatcher SEGV when a monitor hosting a
pinned floating window is disabled (e.g. lid close on a laptop).
After CMonitor::onDisconnect resets m_activeWorkspace to null,
the CMonitor SP stays alive in m_realMonitors, and the pinned-
window branch of moveWorkspaceToMonitor leaves the window's
m_monitor pointing at the disabled monitor.
The next pin dispatch does null deref inside Config::Actions::pinWindow.
* config/actions: fix null derefs in pin dispatcher
PR #14061 replaced moveToWorkspace(m_activeWorkspace) with
assignToSpace(m_activeWorkspace->m_space) and a separate
layoutTarget() call.
The two new derefs aren't covered by the existing PMONITOR check,
and either one being null crashes the compositor.
In practice, i use pyprland which uses pining function,
and since i am on laptop, sometimes my lid is closed and i have
monitor disabled, this causes null deref when computer goes idle.
Layout::CWindowTarget::assignToSpace <- segv
Config::Actions::pinWindow
pin
CDispatcherTranslator::run
CHyprCtl::getReply
In this fix i've added null checks to avoid crashing H
Hagai Cohen committed
b34bbb4f8ef165740735bdbd1915546a00086a96
Parent: 3a69280
Committed by GitHub <noreply@github.com>
on 6/1/2026, 4:44:26 PM