From f9359cf77ff02eff536b33749677ccc5155b4ff4 Mon Sep 17 00:00:00 2001 From: "kepler155c@gmail.com" Date: Mon, 12 Nov 2018 15:22:29 -0500 Subject: [PATCH] wizard - modem fixes --- sys/apis/ui.lua | 2 +- sys/extensions/5.network.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/apis/ui.lua b/sys/apis/ui.lua index fbc3f5c..3dc03c0 100644 --- a/sys/apis/ui.lua +++ b/sys/apis/ui.lua @@ -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 diff --git a/sys/extensions/5.network.lua b/sys/extensions/5.network.lua index 80defd9..3963ae2 100644 --- a/sys/extensions/5.network.lua +++ b/sys/extensions/5.network.lua @@ -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