In error case set device and ui_device to nullptr
This commit is contained in:
parent
8280bc2505
commit
15de10344a
|
@ -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…
Reference in New Issue
Block a user