Skip to content

Commit

Permalink
master: guard PNODE in roll*
Browse files Browse the repository at this point in the history
fixes #4331
  • Loading branch information
vaxerski committed Jan 2, 2024
1 parent 4f26c4e commit 1512b81
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/layout/MasterLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1331,6 +1331,9 @@ std::any CHyprMasterLayout::layoutMessage(SLayoutMessageHeader header, std::stri
const auto PWINDOW = header.pWindow;
const auto PNODE = getNodeFromWindow(PWINDOW);

if (!PNODE)
return 0;

const auto OLDMASTER = PNODE->isMaster ? PNODE : getMasterNodeOnWorkspace(PNODE->workspaceID);
const auto OLDMASTERIT = std::find(m_lMasterNodesData.begin(), m_lMasterNodesData.end(), *OLDMASTER);

Expand All @@ -1353,6 +1356,9 @@ std::any CHyprMasterLayout::layoutMessage(SLayoutMessageHeader header, std::stri
const auto PWINDOW = header.pWindow;
const auto PNODE = getNodeFromWindow(PWINDOW);

if (!PNODE)
return 0;

const auto OLDMASTER = PNODE->isMaster ? PNODE : getMasterNodeOnWorkspace(PNODE->workspaceID);
const auto OLDMASTERIT = std::find(m_lMasterNodesData.begin(), m_lMasterNodesData.end(), *OLDMASTER);

Expand Down

0 comments on commit 1512b81

Please sign in to comment.