In error case set device and ui_device to nullptr

master
max 3 years ago
parent 8280bc2505
commit 15de10344a
  1. 2
      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());
}

Loading…
Cancel
Save