summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-03-04 07:50:49 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-03-07 13:05:26 +1000
commitb4a74bcebc8f1d37b2ed78db3440435ead03299a (patch)
tree6ba3ebd878c8201b8338531896b1a61e889d2ea4 /src
parent00a9b05da71c9071cc910a1c5975165f2a8db9c6 (diff)
Assert that the interface is actually filled in.
Had this in a private bug report recently. Missing hooks for open/close just segfault with little information to debug. Add an assert, this is definitely a bug in the caller and we don't need to recover from that. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r--src/libinput.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libinput.c b/src/libinput.c
index 3c78905f..14808780 100644
--- a/src/libinput.c
+++ b/src/libinput.c
@@ -1517,6 +1517,9 @@ libinput_init(struct libinput *libinput,
const struct libinput_interface_backend *interface_backend,
void *user_data)
{
+ assert(interface->open_restricted != NULL);
+ assert(interface->close_restricted != NULL);
+
libinput->epoll_fd = epoll_create1(EPOLL_CLOEXEC);;
if (libinput->epoll_fd < 0)
return -1;