mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 03:05:59 +01:00
master: Add more null checks for rollnext (#4343)
* add more null check for rollnext * remove pwindow check
This commit is contained in:
parent
4d6d662c67
commit
880996b053
1 changed files with 8 additions and 2 deletions
|
@ -1335,6 +1335,9 @@ std::any CHyprMasterLayout::layoutMessage(SLayoutMessageHeader header, std::stri
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
const auto OLDMASTER = PNODE->isMaster ? PNODE : getMasterNodeOnWorkspace(PNODE->workspaceID);
|
const auto OLDMASTER = PNODE->isMaster ? PNODE : getMasterNodeOnWorkspace(PNODE->workspaceID);
|
||||||
|
if (!OLDMASTER)
|
||||||
|
return 0;
|
||||||
|
|
||||||
const auto OLDMASTERIT = std::find(m_lMasterNodesData.begin(), m_lMasterNodesData.end(), *OLDMASTER);
|
const auto OLDMASTERIT = std::find(m_lMasterNodesData.begin(), m_lMasterNodesData.end(), *OLDMASTER);
|
||||||
|
|
||||||
for (auto& nd : m_lMasterNodesData) {
|
for (auto& nd : m_lMasterNodesData) {
|
||||||
|
@ -1360,6 +1363,9 @@ std::any CHyprMasterLayout::layoutMessage(SLayoutMessageHeader header, std::stri
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
const auto OLDMASTER = PNODE->isMaster ? PNODE : getMasterNodeOnWorkspace(PNODE->workspaceID);
|
const auto OLDMASTER = PNODE->isMaster ? PNODE : getMasterNodeOnWorkspace(PNODE->workspaceID);
|
||||||
|
if (!OLDMASTER)
|
||||||
|
return 0;
|
||||||
|
|
||||||
const auto OLDMASTERIT = std::find(m_lMasterNodesData.begin(), m_lMasterNodesData.end(), *OLDMASTER);
|
const auto OLDMASTERIT = std::find(m_lMasterNodesData.begin(), m_lMasterNodesData.end(), *OLDMASTER);
|
||||||
|
|
||||||
for (auto& nd : m_lMasterNodesData | std::views::reverse) {
|
for (auto& nd : m_lMasterNodesData | std::views::reverse) {
|
||||||
|
|
Loading…
Reference in a new issue