state-routes.lua: Make sure the device is still valid after doing enum_params()

This commit is contained in:
Julian Bouzas 2025-09-10 12:43:57 +00:00 committed by George Kiagiadakis
parent 7eacea9da9
commit ebd9d2a7d5

View file

@ -182,8 +182,15 @@ store_or_restore_routes_hook = AsyncEventHook {
local selected_routes = {}
local push_select_routes = false
-- Make sure the device is still valid
if (device:get_active_features() & Feature.Proxy.BOUND) == 0 then
transition:advance ()
return
end
local dev_info = devinfo:get_device_info (device)
if not dev_info then
transition:advance ()
return
end