From 8aaffda969bcff6708b47fab776ea45979ea7d9f Mon Sep 17 00:00:00 2001 From: nyx <nnyyxxxx@protonmail.com> Date: Sun, 30 Mar 2025 17:18:04 -0400 Subject: [PATCH] core: fix null ref when resuming system (#9794) * core: fix null ref when resuming system * e --- src/Compositor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index cb94116db..8a3a8cbfe 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -2154,11 +2154,13 @@ void CCompositor::moveWorkspaceToMonitor(PHLWORKSPACE pWorkspace, PHLMONITOR pMo Debug::log(LOG, "moveWorkspaceToMonitor: Plugging gap with new {}", nextWorkspaceOnMonitorID); - g_pCompositor->createNewWorkspace(nextWorkspaceOnMonitorID, POLDMON->ID); + if (POLDMON) + g_pCompositor->createNewWorkspace(nextWorkspaceOnMonitorID, POLDMON->ID); } Debug::log(LOG, "moveWorkspaceToMonitor: Plugging gap with existing {}", nextWorkspaceOnMonitorID); - POLDMON->changeWorkspace(nextWorkspaceOnMonitorID, false, true, true); + if (POLDMON) + POLDMON->changeWorkspace(nextWorkspaceOnMonitorID, false, true, true); } // move the workspace