diff --git a/src/libinput.c b/src/libinput.c index 3e56a306..ebfb9289 100644 --- a/src/libinput.c +++ b/src/libinput.c @@ -421,6 +421,9 @@ libinput_event_get_class(struct libinput_event *event) LIBINPUT_EXPORT void libinput_event_destroy(struct libinput_event *event) { + if (event == NULL) + return; + switch (libinput_event_get_class(event)) { case LIBINPUT_EVENT_CLASS_BASE: break;