From a229701f288a2815c70e40b071cdc90147fc2089 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 3 Jul 2022 23:14:51 +0200 Subject: fix crash with null pmonitor in special nodes on dwindle --- src/layout/DwindleLayout.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/layout/DwindleLayout.cpp') diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index 33af48a3..46777847 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -93,17 +93,17 @@ SDwindleNodeData* CHyprDwindleLayout::getMasterNodeOnWorkspace(const int& id) { } void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode) { + // Don't set nodes, only windows. + if (pNode->isNode) + return; + const auto PMONITOR = g_pCompositor->getMonitorFromID(g_pCompositor->getWorkspaceByID(pNode->workspaceID)->m_iMonitorID); - if (!PMONITOR){ + if (!PMONITOR) { Debug::log(ERR, "Orphaned Node %x (workspace ID: %i)!!", pNode, pNode->workspaceID); return; } - // Don't set nodes, only windows. - if (pNode->isNode) - return; - // for gaps outer const bool DISPLAYLEFT = STICKS(pNode->position.x, PMONITOR->vecPosition.x + PMONITOR->vecReservedTopLeft.x); const bool DISPLAYRIGHT = STICKS(pNode->position.x + pNode->size.x, PMONITOR->vecPosition.x + PMONITOR->vecSize.x - PMONITOR->vecReservedBottomRight.x); -- cgit v1.2.3