diff --git a/src/libinput-plugin-lua.c b/src/libinput-plugin-lua.c index 3cc2e452..4dc6b285 100644 --- a/src/libinput-plugin-lua.c +++ b/src/libinput-plugin-lua.c @@ -692,6 +692,9 @@ evdevdevice_info(lua_State *L) lua_newtable(L); /* { bustype: ..., vid: ..., pid: ..., name: ... } */ + if (device->evdev == NULL) + return 1; + lua_pushinteger(L, device->bustype); lua_setfield(L, -2, "bustype"); lua_pushinteger(L, device->vid);