parameter validation

This commit is contained in:
kepler155c@gmail.com committed 2018-10-27 21:34:34 -04:00
1 parent 7220b372bd
commit b564b1e9be
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -1219,7 +1219,7 @@ function UI.Page:focusNext()
end
function UI.Page:setFocus(child)
if not child.focus then
if not child or not child.focus then
return
end
+1
View File
@@ -489,6 +489,7 @@ function Util.insertString(str, istr, pos)
end
function Util.split(str, pattern)
if not str then error('Util:split: invalid parameters', 2) end
pattern = pattern or "(.-)\n"
local t = {}
local function helper(line) table.insert(t, line) return "" end