From ad244190e001de3eded047a5a387ea47fa0b3eea Mon Sep 17 00:00:00 2001 From: Russell Greene Date: Mon, 22 May 2023 05:18:07 -0500 Subject: [PATCH] 1483: fix crash on last display disconnect (#2344) --- src/managers/input/InputManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index a1833a25..964730be 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -91,6 +91,10 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { const auto PMONITOR = g_pCompositor->getMonitorFromCursor(); + // this can happen if there are no displays hooked up to Hyprland + if (PMONITOR == nullptr) + return; + if (*PZOOMFACTOR != 1.f) g_pHyprRenderer->damageMonitor(PMONITOR);