In error case set device and ui_device to nullptr

This commit is contained in:
max 2020-12-15 12:26:52 +01:00
parent 8280bc2505
commit 15de10344a

View File

@ -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());
}