mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 08:05:58 +01:00
subsurfaceTree: Fix nullptr crash when disconnecting a monitor (#4577)
I was able to reproduce this frequently by having a kitty terminal on an monitor running the following command and then unplugging that monitor: `while true; do echo "" && sleep 0.02; done`
This commit is contained in:
parent
cfd68af5b6
commit
15316aaa31
1 changed files with 1 additions and 1 deletions
|
@ -262,7 +262,7 @@ void Events::listener_commitSubsurface(void* owner, void* data) {
|
||||||
|
|
||||||
// tearing: if solitary, redraw it. This still might be a single surface window
|
// tearing: if solitary, redraw it. This still might be a single surface window
|
||||||
const auto PMONITOR = g_pCompositor->getMonitorFromID(pNode->pWindowOwner->m_iMonitorID);
|
const auto PMONITOR = g_pCompositor->getMonitorFromID(pNode->pWindowOwner->m_iMonitorID);
|
||||||
if (PMONITOR->solitaryClient == pNode->pWindowOwner && pNode->pWindowOwner->canBeTorn() && PMONITOR->tearingState.canTear &&
|
if (PMONITOR && PMONITOR->solitaryClient == pNode->pWindowOwner && pNode->pWindowOwner->canBeTorn() && PMONITOR->tearingState.canTear &&
|
||||||
pNode->pSurface->wlr()->current.committed & WLR_SURFACE_STATE_BUFFER) {
|
pNode->pSurface->wlr()->current.committed & WLR_SURFACE_STATE_BUFFER) {
|
||||||
CRegion damageBox{&pNode->pSurface->wlr()->buffer_damage};
|
CRegion damageBox{&pNode->pSurface->wlr()->buffer_damage};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue