From eac44529d81523f0d4865122cd590fca560e009b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 3 Nov 2025 14:47:03 +1000 Subject: [PATCH] lua: return an empty table as device info after device removal As the documentation already promises. Part-of: --- src/libinput-plugin-lua.c | 3 +++ 1 file changed, 3 insertions(+) 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);