From 2e6e0e9278614406979f63692cdb3a015e54c248 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Sat, 4 Jan 2025 00:10:10 +0100 Subject: [PATCH] core: guard workspace and monitor in moveWorkspaceToMonitor ref #7822 --- src/Compositor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index aa6faa16..c80f05e6 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -2076,7 +2076,8 @@ PHLMONITOR CCompositor::getMonitorFromString(const std::string& name) { void CCompositor::moveWorkspaceToMonitor(PHLWORKSPACE pWorkspace, PHLMONITOR pMonitor, bool noWarpCursor) { - // We trust the monitor to be correct. + if (!pWorkspace || !pMonitor) + return; if (pWorkspace->m_pMonitor == pMonitor) return;