mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-21 10:50:06 +01:00
Protect against NULL device on log handler
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
7c860d6002
commit
a7c5ae50f4
1 changed files with 3 additions and 0 deletions
|
|
@ -194,6 +194,9 @@ libevdev_free(struct libevdev *dev)
|
|||
void
|
||||
libevdev_set_log_handler(struct libevdev *dev, libevdev_log_func_t logfunc)
|
||||
{
|
||||
if (dev == NULL)
|
||||
return;
|
||||
|
||||
dev->log = logfunc ? logfunc : libevdev_noop_log_func;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue