From 01228fbc9c785cd04b903a36f4710f04639f11a8 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 3 Jul 2022 22:54:47 +0200 Subject: [PATCH] fix some bugs --- src/managers/input/InputManager.cpp | 3 +++ src/render/Renderer.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 194592cc..13833d18 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -392,6 +392,9 @@ void CInputManager::applyConfigToKeyboard(SKeyboard* pKeyboard) { ASSERT(pKeyboard); + if (!pKeyboard->keyboard->keyboard) + return; + const auto REPEATRATE = HASCONFIG ? g_pConfigManager->getDeviceInt(pKeyboard->name, "repeat_rate") : g_pConfigManager->getInt("input:repeat_rate"); const auto REPEATDELAY = HASCONFIG ? g_pConfigManager->getDeviceInt(pKeyboard->name, "repeat_delay") : g_pConfigManager->getInt("input:repeat_delay"); diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index eaa3cd90..ae5b854e 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -428,7 +428,7 @@ void CHyprRenderer::arrangeLayerArray(SMonitor* pMonitor, const std::listvecPosition.x, pMonitor->vecPosition.y, pMonitor->vecSize.x, pMonitor->vecSize.y}; for (auto& ls : layerSurfaces) { - if (ls->fadingOut || ls->readyToDelete) + if (ls->fadingOut || ls->readyToDelete || !ls->layerSurface) continue; const auto PLAYER = ls->layerSurface;