diff --git a/src/logid/InputDevice.cpp b/src/logid/InputDevice.cpp index 92ba479..a97daf8 100644 --- a/src/logid/InputDevice.cpp +++ b/src/logid/InputDevice.cpp @@ -89,6 +89,8 @@ void InputDevice::registerKey(uint code) if(err != 0) { libevdev_free(device); + device = nullptr; + ui_device = nullptr; throw std::system_error(-err, std::generic_category()); }