summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authorRussell Greene <russellgreene8@gmail.com>2023-05-22 05:18:07 -0500
committerGitHub <noreply@github.com>2023-05-22 12:18:07 +0200
commitad244190e001de3eded047a5a387ea47fa0b3eea (patch)
tree0cf9d8417a37b77e1c8ff860a6c16bbf4997b557 /src/managers/input/InputManager.cpp
parent9f8c5cb63c239ffd09b69cb0c635e8870dbd667e (diff)
1483: fix crash on last display disconnect (#2344)
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp4
1 files changed, 4 insertions, 0 deletions
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);