aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/devices
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-05-04 16:10:32 +0100
committerVaxry <[email protected]>2024-05-04 16:10:32 +0100
commitc951c4f8a1bf02e03c7efbe9a8887c1657ef95d3 (patch)
tree96cd5e3b8c3239554ade1e07c08ae2d4254d1c0d /src/devices
parent25964e5a2b633aed191915efa0de0489bf94dbb9 (diff)
downloadHyprland-c951c4f8a1bf02e03c7efbe9a8887c1657ef95d3.tar.gz
Hyprland-c951c4f8a1bf02e03c7efbe9a8887c1657ef95d3.zip
keyboard: check for wlr() validity before accessing
fixes #5873
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/IKeyboard.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/IKeyboard.cpp b/src/devices/IKeyboard.cpp
index 790766bc..61b078fb 100644
--- a/src/devices/IKeyboard.cpp
+++ b/src/devices/IKeyboard.cpp
@@ -118,7 +118,7 @@ std::string IKeyboard::getActiveLayout() {
void IKeyboard::updateLEDs() {
auto keyboard = wlr();
- if (keyboard->xkb_state == nullptr)
+ if (!keyboard || keyboard->xkb_state == nullptr)
return;
uint32_t leds = 0;