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;