wizard - modem fixes

This commit is contained in:
kepler155c@gmail.com 2018-11-12 15:22:29 -05:00
parent 17d55e75ce
commit f9359cf77f
2 changed files with 2 additions and 2 deletions

View File

@ -2364,8 +2364,8 @@ end
function UI.Wizard:eventHandler(event)
if event.type == 'nextView' then
local currentView = Util.find(self.pages, 'enabled', true)
local nextView = Util.find(self.pages, 'index', currentView.index + 1)
if self:isViewValid() then
local nextView = Util.find(self.pages, 'index', currentView.index + 1)
currentView:emit({ type = 'enable_view', next = nextView, current = currentView })
end

View File

@ -30,7 +30,7 @@ end
-- create a psuedo-device named 'wireleess_modem'
kernel.hook('device_attach', function(_, eventData)
local dev = device[eventData[1]]
if dev.type == 'modem' then
if dev and dev.type == 'modem' then
if setModem(dev) then
startNetwork()
end