Fixing my last change

It wasn't a problem with the bug i tried to fix.
But there  would be a problem if some function would dereference pPreviousGroupMember from the node that was PHEAD->pNextGroupMember.
Please don't be mean!
This commit is contained in:
Dickby 2022-09-23 19:13:05 +02:00 committed by GitHub
parent 718de0d9fa
commit bccc81d306
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -821,15 +821,14 @@ void CHyprDwindleLayout::toggleWindowGroup(CWindow* pWindow) {
PWINDOW->m_bHidden = false; PWINDOW->m_bHidden = false;
} }
if (PHEAD->pPreviousGroupMember) { if (PHEAD->pPreviousGroupMember)
PHEAD->pPreviousGroupMember->pNextGroupMember = PHEAD->pNextGroupMember; PHEAD->pPreviousGroupMember->pNextGroupMember = PHEAD->pNextGroupMember;
PHEAD->pPreviousGroupMember = nullptr;
}
if (PHEAD->pNextGroupMember) { if (PHEAD->pNextGroupMember)
PHEAD->pNextGroupMember->pPreviousGroupMember = PHEAD->pPreviousGroupMember; PHEAD->pNextGroupMember->pPreviousGroupMember = PHEAD->pPreviousGroupMember;
PHEAD->pPreviousGroupMember = nullptr;
PHEAD->pNextGroupMember = nullptr; PHEAD->pNextGroupMember = nullptr;
}
onWindowRemoved(PHEAD->pWindow); onWindowRemoved(PHEAD->pWindow);