keyboard: check for wlr() validity before accessing

fixes #5873
This commit is contained in:
Vaxry 2024-05-04 16:10:32 +01:00
parent 25964e5a2b
commit c951c4f8a1

View file

@ -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;