mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-24 22:50:05 +01:00
Don't return the next element if the queue is full
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
89fabb4e57
commit
7889b467f7
1 changed files with 3 additions and 0 deletions
|
|
@ -214,6 +214,9 @@ queue_num_free_elements(struct libevdev *dev)
|
|||
static inline struct input_event *
|
||||
queue_next_element(struct libevdev *dev)
|
||||
{
|
||||
if (dev->queue_next == dev->queue_size)
|
||||
return NULL;
|
||||
|
||||
return &dev->queue[dev->queue_next];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue