mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2026-05-08 13:38:45 +02:00
Don't return a NULL name, ever.
Even if the device is not yet initialized (which would be a caller bug, but still) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
2da68a74e6
commit
045c3f50a8
1 changed files with 1 additions and 1 deletions
|
|
@ -580,7 +580,7 @@ out:
|
||||||
const char *
|
const char *
|
||||||
libevdev_get_name(const struct libevdev *dev)
|
libevdev_get_name(const struct libevdev *dev)
|
||||||
{
|
{
|
||||||
return dev->name;
|
return dev->name ? dev->name : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue