From cb839c9dcc0196312e5c6b7014114d9b489e0632 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Mon, 5 Sep 2022 00:59:13 +0200 Subject: [PATCH] guard pFoundWindow in CInputManager under fullscreen --- src/managers/input/InputManager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index bdf33969..66015d5b 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -144,6 +144,13 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace); if (PWORKSPACE->m_bHasFullscreenWindow && !foundSurface && PWORKSPACE->m_efFullscreenMode == FULLSCREEN_FULL) { pFoundWindow = g_pCompositor->getFullscreenWindowOnWorkspace(PWORKSPACE->m_iID); + + if (!pFoundWindow) { + // what the fuck, somehow happens occasionally?? + PWORKSPACE->m_bHasFullscreenWindow = false; + return; + } + foundSurface = g_pXWaylandManager->getWindowSurface(pFoundWindow); surfacePos = pFoundWindow->m_vRealPosition.vec();